1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

add a note

llvm-svn: 42579
This commit is contained in:
Chris Lattner 2007-10-03 17:10:03 +00:00
parent 1400027d41
commit a31fa80185

View File

@ -1330,3 +1330,35 @@ Shark tells us that using %cx in the testw instruction is sub-optimal. It
suggests using the 32-bit register (which is what ICC uses). suggests using the 32-bit register (which is what ICC uses).
//===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===//
rdar://5506677 - We compile this:
define i32 @foo(double %x) {
%x14 = bitcast double %x to i64 ; <i64> [#uses=1]
%tmp713 = trunc i64 %x14 to i32 ; <i32> [#uses=1]
%tmp8 = and i32 %tmp713, 2147483647 ; <i32> [#uses=1]
ret i32 %tmp8
}
to:
_foo:
subl $12, %esp
fldl 16(%esp)
fstpl (%esp)
movl $2147483647, %eax
andl (%esp), %eax
addl $12, %esp
#FP_REG_KILL
ret
It would be much better to eliminate the fldl/fstpl by folding the bitcast
into the load SDNode. That would give us:
_foo:
movl $2147483647, %eax
andl 4(%esp), %eax
ret
//===---------------------------------------------------------------------===//