diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-12 06:52:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-12 06:52:53 +0000 |
commit | d1980a5acd8509ea34ee2dec5e13de5dbe16af2d (patch) | |
tree | 287038ace4f1d384e8d4f039f22ceae688138012 /lib/Target/X86/README.txt | |
parent | 2b9f4349086247c58ed0bcd17c7d11b14b14f52b (diff) | |
download | external_llvm-d1980a5acd8509ea34ee2dec5e13de5dbe16af2d.zip external_llvm-d1980a5acd8509ea34ee2dec5e13de5dbe16af2d.tar.gz external_llvm-d1980a5acd8509ea34ee2dec5e13de5dbe16af2d.tar.bz2 |
Move 3 "(add (select cc, 0, c), x) -> (select cc, x, (add, x, c))"
related transformations out of target-specific dag combine into the
ARM backend. These were added by Evan in r37685 with no testcases
and only seems to help ARM (e.g. test/CodeGen/ARM/select_xform.ll).
Add some simple X86-specific (for now) DAG combines that turn things
like cond ? 8 : 0 -> (zext(cond) << 3). This happens frequently
with the recently added cp constant select optimization, but is a
very general xform. For example, we now compile the second example
in const-select.ll to:
_test:
movsd LCPI2_0, %xmm0
ucomisd 8(%esp), %xmm0
seta %al
movzbl %al, %eax
movl 4(%esp), %ecx
movsbl (%ecx,%eax,4), %eax
ret
instead of:
_test:
movl 4(%esp), %eax
leal 4(%eax), %ecx
movsd LCPI2_0, %xmm0
ucomisd 8(%esp), %xmm0
cmovbe %eax, %ecx
movsbl (%ecx), %eax
ret
This passes multisource and dejagnu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r-- | lib/Target/X86/README.txt | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 5d0446f..a2cf079 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -1842,28 +1842,6 @@ signed or unsigned overflow, respectively. //===---------------------------------------------------------------------===// -test/CodeGen/X86/2009-03-07-FPConstSelect.ll compiles to: - -_f: - xorl %eax, %eax - cmpl $0, 4(%esp) - movl $4, %ecx - cmovne %eax, %ecx - flds LCPI1_0(%ecx) - ret - -we should recognize cmov of 0 and a power of two and compile it into a -setcc+shift. This would give us something like: - -_f: - xorl %eax,%eax - cmpl $0, 4(%esp) - seteq %al - flds LCPI1_0(%ecx, %eax,4) - ret - -//===---------------------------------------------------------------------===// - memcpy/memmove do not lower to SSE copies when possible. A silly example is: define <16 x float> @foo(<16 x float> %A) nounwind { %tmp = alloca <16 x float>, align 16 |