diff options
| author | Hao Liu <Hao.Liu@arm.com> | 2013-12-30 01:38:41 +0000 |
|---|---|---|
| committer | Hao Liu <Hao.Liu@arm.com> | 2013-12-30 01:38:41 +0000 |
| commit | 74107fe5269a643f5dab2fe8939d5079ca233c6e (patch) | |
| tree | 987d678c05d81d692c5355e8fa7cc37887b5172b /llvm/lib | |
| parent | c45921903ffbfb09ab33e26d3ca2de4a5aba4c7b (diff) | |
| download | bcm5719-llvm-74107fe5269a643f5dab2fe8939d5079ca233c6e.tar.gz bcm5719-llvm-74107fe5269a643f5dab2fe8939d5079ca233c6e.zip | |
[AArch64]Fix the problem that can't select mul of v1i64/v2i64 types.
E.g. Can't select such IR:
%tmp = mul <2 x i64> %a, %b
llvm-svn: 198188
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index 757eb0b248e..548e76e5218 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -385,6 +385,18 @@ AArch64TargetLowering::AArch64TargetLowering(AArch64TargetMachine &TM) setTruncStoreAction(VT, VT1, Expand); } } + + // There is no v1i64/v2i64 multiply, expand v1i64/v2i64 to GPR i64 multiply. + // FIXME: For a v2i64 multiply, we copy VPR to GPR and do 2 i64 multiplies, + // and then copy back to VPR. This solution may be optimized by Following 3 + // NEON instructions: + // pmull v2.1q, v0.1d, v1.1d + // pmull2 v3.1q, v0.2d, v1.2d + // ins v2.d[1], v3.d[0] + // As currently we can't verify the correctness of such assumption, we can + // do such optimization in the future. + setOperationAction(ISD::MUL, MVT::v1i64, Expand); + setOperationAction(ISD::MUL, MVT::v2i64, Expand); } } |

