diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-23 11:27:19 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-23 11:27:19 +0000 |
commit | 35c93e4e42d7a35a90e89211fa62f478e25ba0a4 (patch) | |
tree | 639fbed77642a320f45ade7a571b37f1fbdf7b3c /test/CodeGen/SystemZ/int-cmp-03.ll | |
parent | 65ddcfa8c1c05aeecd9d4fb062bb121e376aaceb (diff) | |
download | llvm-35c93e4e42d7a35a90e89211fa62f478e25ba0a4.tar.gz llvm-35c93e4e42d7a35a90e89211fa62f478e25ba0a4.tar.bz2 llvm-35c93e4e42d7a35a90e89211fa62f478e25ba0a4.tar.xz |
[SystemZ] Try reversing comparisons whose first operand is in memory
This allows us to make more use of the many compare reg,mem instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ/int-cmp-03.ll')
-rw-r--r-- | test/CodeGen/SystemZ/int-cmp-03.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/SystemZ/int-cmp-03.ll b/test/CodeGen/SystemZ/int-cmp-03.ll index 2d679cf592..9602d54e5c 100644 --- a/test/CodeGen/SystemZ/int-cmp-03.ll +++ b/test/CodeGen/SystemZ/int-cmp-03.ll @@ -160,3 +160,16 @@ define double @f11(double %a, double %b, i32 %i1, i64 %base, i64 %index) { %res = select i1 %cond, double %a, double %b ret double %res } + +; Check the comparison can be reversed if that allows CL to be used. +define double @f12(double %a, double %b, i32 %i2, i32 *%ptr) { +; CHECK-LABEL: f12: +; CHECK: cl %r2, 0(%r3) +; CHECK-NEXT: jh {{\.L.*}} +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %i1 = load i32 *%ptr + %cond = icmp ult i32 %i1, %i2 + %res = select i1 %cond, double %a, double %b + ret double %res +} |