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 | 4147f08e449bc72cac07d5ca6bc47209ad96c3e3 (patch) | |
| tree | 13b7a4452bc88e1b5aaa0313680166fb101bcd55 /llvm/lib/Target/ARM/ARMSubtarget.cpp | |
| parent | a492d29c230c27e65ff23762cd73d86233ebb728 (diff) | |
| download | bcm5719-llvm-4147f08e449bc72cac07d5ca6bc47209ad96c3e3.tar.gz bcm5719-llvm-4147f08e449bc72cac07d5ca6bc47209ad96c3e3.zip | |
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.
llvm-svn: 66779
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.cpp')
0 files changed, 0 insertions, 0 deletions

