diff options
Diffstat (limited to 'test/CodeGen/SystemZ/fp-cmp-02.ll')
-rw-r--r-- | test/CodeGen/SystemZ/fp-cmp-02.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/SystemZ/fp-cmp-02.ll b/test/CodeGen/SystemZ/fp-cmp-02.ll index 309d12e824..1cd6da8c77 100644 --- a/test/CodeGen/SystemZ/fp-cmp-02.ll +++ b/test/CodeGen/SystemZ/fp-cmp-02.ll @@ -159,3 +159,16 @@ define i64 @f8(i64 %a, i64 %b, double %f) { %res = select i1 %cond, i64 %a, i64 %b ret i64 %res } + +; Check the comparison can be reversed if that allows CDB to be used, +define i64 @f9(i64 %a, i64 %b, double %f2, double *%ptr) { +; CHECK-LABEL: f9: +; CHECK: cdb %f0, 0(%r4) +; CHECK-NEXT: jl {{\.L.*}} +; CHECK: lgr %r2, %r3 +; CHECK: br %r14 + %f1 = load double *%ptr + %cond = fcmp ogt double %f1, %f2 + %res = select i1 %cond, i64 %a, i64 %b + ret i64 %res +} |