[SystemZ] Allow integer XOR involving high words
[oota-llvm.git] / test / CodeGen / SystemZ / fp-cmp-02.ll
index 309d12e824afa1aab89f74e4c3953a81f2ccedab..1cd6da8c770852c74969fce1e13655c7040cb9c3 100644 (file)
@@ -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
+}