ARM64: scalarize v1i64 mul operation
authorTim Northover <tnorthover@apple.com>
Wed, 9 Apr 2014 07:07:02 +0000 (07:07 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 9 Apr 2014 07:07:02 +0000 (07:07 +0000)
This is the second part of fixing PR19367.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205836 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM64/ARM64ISelLowering.cpp
test/CodeGen/ARM64/vmul.ll

index 63957abdfdd4da5a766e578de50a8a24c2ad5a5f..0fcafc1f87e48653231c4b1bcc861ab6a2daa620 100644 (file)
@@ -173,6 +173,8 @@ ARM64TargetLowering::ARM64TargetLowering(ARM64TargetMachine &TM)
   setOperationAction(ISD::UINT_TO_FP, MVT::v1i64, Expand);
   setOperationAction(ISD::FP_ROUND, MVT::v1f64, Expand);
 
+  setOperationAction(ISD::MUL, MVT::v1i64, Expand);
+
   // Custom lowering hooks are needed for XOR
   // to fold it into CSINC/CSINV.
   setOperationAction(ISD::XOR, MVT::i32, Custom);
index d11bb2f72ebd7154f34a427151e10d08d95e065e..b6bd16ac0b4c7e699532c2eac67051e48756cfab 100644 (file)
@@ -2027,3 +2027,10 @@ define <16 x i8> @test_pmull_high_64(<2 x i64> %l, <2 x i64> %r) nounwind {
 }
 
 declare <16 x i8> @llvm.arm64.neon.pmull64(i64, i64)
+
+define <1 x i64> @test_mul_v1i64(<1 x i64> %lhs, <1 x i64> %rhs) nounwind {
+; CHECK-LABEL: test_mul_v1i64:
+; CHECK: mul
+  %prod = mul <1 x i64> %lhs, %rhs
+  ret <1 x i64> %prod
+}