summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-09 06:55:39 +0000
committerTim Northover <tnorthover@apple.com>2014-04-09 06:55:39 +0000
commitb430cf6681c55d97a14ecb1d27fd287bef523b57 (patch)
treefc823e35887a8779cf75e019b575f7d405cc44af /llvm
parent5c503bf4c4bb8ee32a889462814a3bbd42c2ae8d (diff)
downloadbcm5719-llvm-b430cf6681c55d97a14ecb1d27fd287bef523b57.tar.gz
bcm5719-llvm-b430cf6681c55d97a14ecb1d27fd287bef523b57.zip
ARM64: add pattern for <1 x i64> custom not node.
This should fix PR19367. llvm-svn: 205835
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM64/ARM64InstrInfo.td1
-rw-r--r--llvm/test/CodeGen/ARM64/vcmp.ll9
2 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64InstrInfo.td b/llvm/lib/Target/ARM64/ARM64InstrInfo.td
index 3745a70df85..376d39e7482 100644
--- a/llvm/lib/Target/ARM64/ARM64InstrInfo.td
+++ b/llvm/lib/Target/ARM64/ARM64InstrInfo.td
@@ -2150,6 +2150,7 @@ def : Pat<(ARM64not (v16i8 V128:$Rn)), (NOTv16i8 V128:$Rn)>;
def : Pat<(ARM64not (v4i16 V64:$Rn)), (NOTv8i8 V64:$Rn)>;
def : Pat<(ARM64not (v8i16 V128:$Rn)), (NOTv16i8 V128:$Rn)>;
def : Pat<(ARM64not (v2i32 V64:$Rn)), (NOTv8i8 V64:$Rn)>;
+def : Pat<(ARM64not (v1i64 V64:$Rn)), (NOTv8i8 V64:$Rn)>;
def : Pat<(ARM64not (v4i32 V128:$Rn)), (NOTv16i8 V128:$Rn)>;
def : Pat<(ARM64not (v2i64 V128:$Rn)), (NOTv16i8 V128:$Rn)>;
diff --git a/llvm/test/CodeGen/ARM64/vcmp.ll b/llvm/test/CodeGen/ARM64/vcmp.ll
index f9275b825f5..16ff177a054 100644
--- a/llvm/test/CodeGen/ARM64/vcmp.ll
+++ b/llvm/test/CodeGen/ARM64/vcmp.ll
@@ -225,3 +225,12 @@ define <1 x i64> @fcmlt_d(<1 x double> %A, <1 x double> %B) nounwind {
%mask = sext <1 x i1> %tst to <1 x i64>
ret <1 x i64> %mask
}
+
+define <1 x i64> @cmnez_d(<1 x i64> %A) nounwind {
+; CHECK-LABEL: cmnez_d:
+; CHECK: cmeq d[[EQ:[0-9]+]], d0, #0
+; CHECK: not.8b v0, v[[EQ]]
+ %tst = icmp ne <1 x i64> %A, zeroinitializer
+ %mask = sext <1 x i1> %tst to <1 x i64>
+ ret <1 x i64> %mask
+}
OpenPOWER on IntegriCloud