add a note that is important for some fp apps.

llvm-svn: 45723
This commit is contained in:
Chris Lattner 2008-01-07 21:59:58 +00:00
parent 8569309bca
commit ef81aa75f6
1 changed files with 21 additions and 0 deletions

View File

@ -1597,3 +1597,24 @@ a stride-4 IV, would would allow all the scales in the loop to go away.
This would result in smaller code and more efficient microops.
//===---------------------------------------------------------------------===//
In SSE mode, we turn abs and neg into a load from the constant pool plus a xor
or and instruction, for example:
xorpd LCPI2_0-"L2$pb"(%esi), %xmm2
However, if xmm2 gets spilled, we end up with really ugly code like this:
%xmm2 = reload [mem]
xorpd LCPI2_0-"L2$pb"(%esi), %xmm2
store %xmm2 -> [mem]
Since we 'know' that this is a 'neg', we can actually "fold" the spill into
the neg/abs instruction, turning it into an *integer* operation, like this:
xorl 2147483648, [mem+4] ## 2147483648 = (1 << 31)
you could also use xorb, but xorl is less likely to lead to a partial register
stall.
//===---------------------------------------------------------------------===//