summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll
diff options
context:
space:
mode:
authorSam Parker <sam.parker@arm.com>2017-10-25 08:33:06 +0000
committerSam Parker <sam.parker@arm.com>2017-10-25 08:33:06 +0000
commitccb209bb97a682268a8841e5505ab5d7cea1bd13 (patch)
tree12ba5583916397020d39e73d0c81621d30275688 /llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll
parent6ec2b8ac775918c4cdb5e3920a8ac212dcc1097c (diff)
downloadbcm5719-llvm-ccb209bb97a682268a8841e5505ab5d7cea1bd13.tar.gz
bcm5719-llvm-ccb209bb97a682268a8841e5505ab5d7cea1bd13.zip
[ARM] Swap cmp operands for automatic shifts
Swap the compare operands if the lhs is a shift and the rhs isn't, as in arm and T2 the shift can be performed by the compare for its second operand. Differential Revision: https://reviews.llvm.org/D39004 llvm-svn: 316562
Diffstat (limited to 'llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll')
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll52
1 files changed, 0 insertions, 52 deletions
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll b/llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll
deleted file mode 100644
index 4d840030f82..00000000000
--- a/llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll
+++ /dev/null
@@ -1,52 +0,0 @@
-; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - | FileCheck %s
-
-; These tests would be improved by 'movs r0, #0' being rematerialized below the
-; test as 'mov.w r0, #0'.
-
-define i1 @f1(i32 %a, i32 %b) {
-; CHECK-LABEL: f1:
-; CHECK: cmp {{.*}}, r1
- %tmp = icmp ne i32 %a, %b
- ret i1 %tmp
-}
-
-define i1 @f2(i32 %a, i32 %b) {
-; CHECK-LABEL: f2:
-; CHECK: cmp {{.*}}, r1
- %tmp = icmp eq i32 %a, %b
- ret i1 %tmp
-}
-
-define i1 @f6(i32 %a, i32 %b) {
-; CHECK-LABEL: f6:
-; CHECK: cmp.w {{.*}}, r1, lsl #5
- %tmp = shl i32 %b, 5
- %tmp1 = icmp eq i32 %tmp, %a
- ret i1 %tmp1
-}
-
-define i1 @f7(i32 %a, i32 %b) {
-; CHECK-LABEL: f7:
-; CHECK: cmp.w {{.*}}, r1, lsr #6
- %tmp = lshr i32 %b, 6
- %tmp1 = icmp ne i32 %tmp, %a
- ret i1 %tmp1
-}
-
-define i1 @f8(i32 %a, i32 %b) {
-; CHECK-LABEL: f8:
-; CHECK: cmp.w {{.*}}, r1, asr #7
- %tmp = ashr i32 %b, 7
- %tmp1 = icmp eq i32 %a, %tmp
- ret i1 %tmp1
-}
-
-define i1 @f9(i32 %a, i32 %b) {
-; CHECK-LABEL: f9:
-; CHECK: cmp.w {{.*}}, {{.*}}, ror #8
- %l8 = shl i32 %a, 24
- %r8 = lshr i32 %a, 8
- %tmp = or i32 %l8, %r8
- %tmp1 = icmp ne i32 %a, %tmp
- ret i1 %tmp1
-}
OpenPOWER on IntegriCloud