diff options
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/int-cmp-08.ll')
-rw-r--r-- | llvm/test/CodeGen/SystemZ/int-cmp-08.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/int-cmp-08.ll b/llvm/test/CodeGen/SystemZ/int-cmp-08.ll index e68a0fefa04..b6f48d31815 100644 --- a/llvm/test/CodeGen/SystemZ/int-cmp-08.ll +++ b/llvm/test/CodeGen/SystemZ/int-cmp-08.ll @@ -116,3 +116,16 @@ define double @f8(double %a, double %b, i64 %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 CLG to be used. +define double @f9(double %a, double %b, i64 %i2, i64 *%ptr) { +; CHECK-LABEL: f9: +; CHECK: clg %r2, 0(%r3) +; CHECK-NEXT: jh {{\.L.*}} +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %i1 = load i64 *%ptr + %cond = icmp ult i64 %i1, %i2 + %res = select i1 %cond, double %a, double %b + ret double %res +} |