diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-07 21:59:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-07 21:59:58 +0000 |
commit | 0362a36e4206c942e7a666e225f8ca3654033666 (patch) | |
tree | 1570751952304243e12d9ff301c56ce7c1135f5b /lib/Target/X86/README.txt | |
parent | 8551f1998cd93dbfde615b4b774ab8663b570e4a (diff) | |
download | external_llvm-0362a36e4206c942e7a666e225f8ca3654033666.zip external_llvm-0362a36e4206c942e7a666e225f8ca3654033666.tar.gz external_llvm-0362a36e4206c942e7a666e225f8ca3654033666.tar.bz2 |
add a note that is important for some fp apps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r-- | lib/Target/X86/README.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 759c7ac..be37acf 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -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. + +//===---------------------------------------------------------------------===// |