aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2019-08-15 09:26:51 +0000
committerDavid Green <david.green@arm.com>2019-08-15 09:26:51 +0000
commit04f2f32869b3a62e236cfaa134f378771e48c129 (patch)
treefc59b0095f3e3fbbb4df0328d28ce103eb3e2768 /llvm/lib
parenta1aef90bdd9ae7febce70f96f4a05a0074c8b556 (diff)
downloadllvm-04f2f32869b3a62e236cfaa134f378771e48c129.zip
llvm-04f2f32869b3a62e236cfaa134f378771e48c129.tar.gz
llvm-04f2f32869b3a62e236cfaa134f378771e48c129.tar.bz2
[ARM] MVE trunc to i1 vectors
This adds patterns for selecting trunc instructions from full vectors to i1's vectors. Differential Revision: https://reviews.llvm.org/D66201 llvm-svn: 368981
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMInstrMVE.td7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrMVE.td b/llvm/lib/Target/ARM/ARMInstrMVE.td
index a50c7c2..b4a7a13 100644
--- a/llvm/lib/Target/ARM/ARMInstrMVE.td
+++ b/llvm/lib/Target/ARM/ARMInstrMVE.td
@@ -4666,6 +4666,13 @@ let Predicates = [HasMVEInt] in {
(v8i16 (MVE_VPSEL (MVE_VMOVimmi16 1), (MVE_VMOVimmi16 0), 0, VCCR:$pred))>;
def : Pat<(v4i32 (anyext (v4i1 VCCR:$pred))),
(v4i32 (MVE_VPSEL (MVE_VMOVimmi32 1), (MVE_VMOVimmi32 0), 0, VCCR:$pred))>;
+
+ def : Pat<(v16i1 (trunc (v16i8 MQPR:$v1))),
+ (v16i1 (MVE_VCMPi32r (v16i8 MQPR:$v1), ZR, 1))>;
+ def : Pat<(v8i1 (trunc (v8i16 MQPR:$v1))),
+ (v8i1 (MVE_VCMPi32r (v8i16 MQPR:$v1), ZR, 1))>;
+ def : Pat<(v4i1 (trunc (v4i32 MQPR:$v1))),
+ (v4i1 (MVE_VCMPi32r (v4i32 MQPR:$v1), ZR, 1))>;
}
let Predicates = [HasMVEFloat] in {