summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-06 09:59:12 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-06 09:59:12 +0000
commit198ddf83c1b64b95321ea8b2f764aace81d6963d (patch)
tree0cb4ce5955d09d84bc81c23e81802c9055e1d276 /llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
parent7b4118a0fcf1c99fb352cef9c297f97af7a35757 (diff)
downloadbcm5719-llvm-198ddf83c1b64b95321ea8b2f764aace81d6963d.tar.gz
bcm5719-llvm-198ddf83c1b64b95321ea8b2f764aace81d6963d.zip
[SystemZ] Use LOAD AND TEST for comparisons with -0
...since it os equivalent to comparison with +0. llvm-svn: 196580
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/fp-cmp-04.ll')
-rw-r--r--llvm/test/CodeGen/SystemZ/fp-cmp-04.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll b/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
index 8d842164fa4..705a276563c 100644
--- a/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
+++ b/llvm/test/CodeGen/SystemZ/fp-cmp-04.ll
@@ -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
+}
OpenPOWER on IntegriCloud