[SystemZ] Use LOAD AND TEST for comparisons with -0

...since it os equivalent to comparison with +0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Sandiford
2013-12-06 09:59:12 +00:00
parent 8bf51dc72b
commit 9f9758935a
3 changed files with 27 additions and 5 deletions

View 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
}