X86 if conversion + tail merging issues from PR6032.

llvm-svn: 93372
This commit is contained in:
Chris Lattner 2010-01-13 23:28:40 +00:00
parent 52ce62f069
commit fb534d97b5
1 changed files with 20 additions and 0 deletions

View File

@ -1868,3 +1868,23 @@ carried over to machine instructions. Asm printer (or JIT) can use this
information to add the "lock" prefix.
//===---------------------------------------------------------------------===//
The X86 backend should be able to if-convert SSE comparisons like "ucomisd" to
"cmpsd". For example, this code:
double d1(double x) { return x == x ? x : x + x; }
Compiles into:
_d1:
ucomisd %xmm0, %xmm0
jnp LBB1_2
addsd %xmm0, %xmm0
ret
LBB1_2:
ret
Also, the 'ret's should be shared. This is PR6032.
//===---------------------------------------------------------------------===//