From 7db3c63bb2d7fc98592cf341f413e68184c39636 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Wed, 9 Apr 2014 06:55:39 +0000 Subject: [PATCH] ARM64: add pattern for <1 x i64> custom not node. This should fix PR19367. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205835 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM64/ARM64InstrInfo.td | 1 + test/CodeGen/ARM64/vcmp.ll | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/Target/ARM64/ARM64InstrInfo.td b/lib/Target/ARM64/ARM64InstrInfo.td index 3745a70df85..376d39e7482 100644 --- a/lib/Target/ARM64/ARM64InstrInfo.td +++ b/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/test/CodeGen/ARM64/vcmp.ll b/test/CodeGen/ARM64/vcmp.ll index f9275b825f5..16ff177a054 100644 --- a/test/CodeGen/ARM64/vcmp.ll +++ b/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 +} -- 2.34.1