diff options
author | Chris Lattner <sabre@nondot.org> | 2007-03-04 20:03:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-03-04 20:03:15 +0000 |
commit | 91153686f04bafe3b10c99edb1735444953f7517 (patch) | |
tree | c10b76d5ab01bcb6db46ce33a76b1861d70813e3 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 175415e116feef0def0f7c084cca3646a403412b (diff) |
canonicalize constants to the RHS of addc/adde. If nothing uses the carry out of
addc, turn it into add.
This allows us to compile:
long long test(long long A, unsigned B) {
return (A + ((long long)B << 32)) & 123;
}
into:
_test:
movl $123, %eax
andl 4(%esp), %eax
xorl %edx, %edx
ret
instead of:
_test:
xorl %edx, %edx
movl %edx, %eax
addl 4(%esp), %eax ;; add of zero
andl $123, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
0 files changed, 0 insertions, 0 deletions