summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-09 07:07:02 +0000
committerTim Northover <tnorthover@apple.com>2014-04-09 07:07:02 +0000
commitb36d428d27ba195e29bbb119e575a0a6d8261d33 (patch)
tree3cfc43e23dca781424838ff562460c1a182c6828 /llvm
parentb430cf6681c55d97a14ecb1d27fd287bef523b57 (diff)
downloadbcm5719-llvm-b36d428d27ba195e29bbb119e575a0a6d8261d33.tar.gz
bcm5719-llvm-b36d428d27ba195e29bbb119e575a0a6d8261d33.zip
ARM64: scalarize v1i64 mul operation
This is the second part of fixing PR19367. llvm-svn: 205836
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM64/ARM64ISelLowering.cpp2
-rw-r--r--llvm/test/CodeGen/ARM64/vmul.ll7
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64ISelLowering.cpp b/llvm/lib/Target/ARM64/ARM64ISelLowering.cpp
index 63957abdfdd..0fcafc1f87e 100644
--- a/llvm/lib/Target/ARM64/ARM64ISelLowering.cpp
+++ b/llvm/lib/Target/ARM64/ARM64ISelLowering.cpp
@@ -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);
diff --git a/llvm/test/CodeGen/ARM64/vmul.ll b/llvm/test/CodeGen/ARM64/vmul.ll
index d11bb2f72eb..b6bd16ac0b4 100644
--- a/llvm/test/CodeGen/ARM64/vmul.ll
+++ b/llvm/test/CodeGen/ARM64/vmul.ll
@@ -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
+}
OpenPOWER on IntegriCloud