[SystemZ] Use LOAD AND TEST for comparisons with -0
[oota-llvm.git] / test / CodeGen / SystemZ / fp-cmp-04.ll
index 8d842164fa4fac74905d09b49c8b43b64d94019c..705a276563c35fdf02dd8e106271269e84ff596a 100644 (file)
@@ -346,3 +346,22 @@ store:
 exit:
   ret double %val
 }
+
+; Repeat f2 with a comparison against -0.
+define float @f17(float %a, float %b, float *%dest) {
+; CHECK-LABEL: f17:
+; CHECK: aebr %f0, %f2
+; CHECK-NEXT: jl .L{{.*}}
+; CHECK: br %r14
+entry:
+  %res = fadd float %a, %b
+  %cmp = fcmp olt float %res, -0.0
+  br i1 %cmp, label %exit, label %store
+
+store:
+  store float %b, float *%dest
+  br label %exit
+
+exit:
+  ret float %res
+}