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 | 24e597b8c5986f4cc2d23e8145c0f04c57fae0bd (patch) | |
tree | 7afe4da420482b37cf87fc0a6b23c8f4e14148f2 /llvm/test/CodeGen/SystemZ/int-cmp-01.ll | |
parent | a481f5854203e81cde5bba83e3f4c9a7c321fd29 (diff) | |
download | bcm5719-llvm-24e597b8c5986f4cc2d23e8145c0f04c57fae0bd.tar.gz bcm5719-llvm-24e597b8c5986f4cc2d23e8145c0f04c57fae0bd.zip |
[SystemZ] Try reversing comparisons whose first operand is in memory
This allows us to make more use of the many compare reg,mem instructions.
llvm-svn: 189099
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/int-cmp-01.ll')
-rw-r--r-- | llvm/test/CodeGen/SystemZ/int-cmp-01.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/int-cmp-01.ll b/llvm/test/CodeGen/SystemZ/int-cmp-01.ll index dbfe0dfd645..6653b6f706f 100644 --- a/llvm/test/CodeGen/SystemZ/int-cmp-01.ll +++ b/llvm/test/CodeGen/SystemZ/int-cmp-01.ll @@ -149,3 +149,17 @@ define void @f10(i32 %lhs, i64 %base, i64 %index, i32 *%dst) { store i32 %res, i32 *%dst ret void } + +; Check the comparison can be reversed if that allows CH to be used. +define double @f11(double %a, double %b, i32 %rhs, i16 *%src) { +; CHECK-LABEL: f11: +; CHECK: ch %r2, 0(%r3) +; CHECK-NEXT: jh {{\.L.*}} +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %half = load i16 *%src + %lhs = sext i16 %half to i32 + %cond = icmp slt i32 %lhs, %rhs + %res = select i1 %cond, double %a, double %b + ret double %res +} |