diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-09-20 22:52:00 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-09-20 22:52:00 +0000 |
commit | f3e9a48584f344caa7b211e330387fb39b762265 (patch) | |
tree | ecf3b0aa2e87dde290e0a7a674abeb609acf1f4c /llvm/test/CodeGen/X86/compare-inf.ll | |
parent | abb5a7370d021c33c9f4e4640acfe9289b21c93c (diff) | |
download | bcm5719-llvm-f3e9a48584f344caa7b211e330387fb39b762265.tar.gz bcm5719-llvm-f3e9a48584f344caa7b211e330387fb39b762265.zip |
Enable machine sinking critical edge splitting. e.g.
define double @foo(double %x, double %y, i1 %c) nounwind {
%a = fdiv double %x, 3.2
%z = select i1 %c, double %a, double %y
ret double %z
}
Was:
_foo:
divsd LCPI0_0(%rip), %xmm0
testb $1, %dil
jne LBB0_2
movaps %xmm1, %xmm0
LBB0_2:
ret
Now:
_foo:
testb $1, %dil
je LBB0_2
divsd LCPI0_0(%rip), %xmm0
ret
LBB0_2:
movaps %xmm1, %xmm0
ret
This avoids the divsd when early exit is taken.
rdar://8454886
llvm-svn: 114372
Diffstat (limited to 'llvm/test/CodeGen/X86/compare-inf.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/compare-inf.ll | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/X86/compare-inf.ll b/llvm/test/CodeGen/X86/compare-inf.ll index 2be90c9764c..9aa44a30af5 100644 --- a/llvm/test/CodeGen/X86/compare-inf.ll +++ b/llvm/test/CodeGen/X86/compare-inf.ll @@ -5,7 +5,7 @@ ; CHECK: oeq_inff: ; CHECK: ucomiss -; CHECK: jae +; CHECK: jb define float @oeq_inff(float %x, float %y) nounwind readonly { %t0 = fcmp oeq float %x, 0x7FF0000000000000 %t1 = select i1 %t0, float 1.0, float %y @@ -14,7 +14,7 @@ define float @oeq_inff(float %x, float %y) nounwind readonly { ; CHECK: oeq_inf: ; CHECK: ucomisd -; CHECK: jae +; CHECK: jb define double @oeq_inf(double %x, double %y) nounwind readonly { %t0 = fcmp oeq double %x, 0x7FF0000000000000 %t1 = select i1 %t0, double 1.0, double %y @@ -23,7 +23,7 @@ define double @oeq_inf(double %x, double %y) nounwind readonly { ; CHECK: une_inff: ; CHECK: ucomiss -; CHECK: jb +; CHECK: jae define float @une_inff(float %x, float %y) nounwind readonly { %t0 = fcmp une float %x, 0x7FF0000000000000 %t1 = select i1 %t0, float 1.0, float %y @@ -32,7 +32,7 @@ define float @une_inff(float %x, float %y) nounwind readonly { ; CHECK: une_inf: ; CHECK: ucomisd -; CHECK: jb +; CHECK: jae define double @une_inf(double %x, double %y) nounwind readonly { %t0 = fcmp une double %x, 0x7FF0000000000000 %t1 = select i1 %t0, double 1.0, double %y @@ -41,7 +41,7 @@ define double @une_inf(double %x, double %y) nounwind readonly { ; CHECK: oeq_neg_inff: ; CHECK: ucomiss -; CHECK: jae +; CHECK: jb define float @oeq_neg_inff(float %x, float %y) nounwind readonly { %t0 = fcmp oeq float %x, 0xFFF0000000000000 %t1 = select i1 %t0, float 1.0, float %y @@ -50,7 +50,7 @@ define float @oeq_neg_inff(float %x, float %y) nounwind readonly { ; CHECK: oeq_neg_inf: ; CHECK: ucomisd -; CHECK: jae +; CHECK: jb define double @oeq_neg_inf(double %x, double %y) nounwind readonly { %t0 = fcmp oeq double %x, 0xFFF0000000000000 %t1 = select i1 %t0, double 1.0, double %y @@ -59,7 +59,7 @@ define double @oeq_neg_inf(double %x, double %y) nounwind readonly { ; CHECK: une_neg_inff: ; CHECK: ucomiss -; CHECK: jb +; CHECK: jae define float @une_neg_inff(float %x, float %y) nounwind readonly { %t0 = fcmp une float %x, 0xFFF0000000000000 %t1 = select i1 %t0, float 1.0, float %y @@ -68,7 +68,7 @@ define float @une_neg_inff(float %x, float %y) nounwind readonly { ; CHECK: une_neg_inf: ; CHECK: ucomisd -; CHECK: jb +; CHECK: jae define double @une_neg_inf(double %x, double %y) nounwind readonly { %t0 = fcmp une double %x, 0xFFF0000000000000 %t1 = select i1 %t0, double 1.0, double %y |