diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2007-12-18 21:32:20 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2007-12-18 21:32:20 +0000 |
commit | f78cd32d6ed4870996acea6577f2d690e6fd346c (patch) | |
tree | ab9fedb8e4176350b31a3713954215b415645cf1 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | d3b5874e753cbb928decb1c40b4600a4a20272af (diff) | |
download | external_llvm-f78cd32d6ed4870996acea6577f2d690e6fd346c.zip external_llvm-f78cd32d6ed4870996acea6577f2d690e6fd346c.tar.gz external_llvm-f78cd32d6ed4870996acea6577f2d690e6fd346c.tar.bz2 |
Fold subtracts into integer compares vs. zero. This improves generate code for this case on X86
from
_foo:
movl $99, %ecx
movl 4(%esp), %eax
subl %eax, %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovs %edx, %eax
ret
to
_foo:
xorl %ecx, %ecx
movl 4(%esp), %eax
cmpl $99, %eax
cmovg %ecx, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45173 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
0 files changed, 0 insertions, 0 deletions