Chris Lattner 91153686f0 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
2007-03-04 20:03:15 +00:00
..
2007-02-21 22:48:45 +00:00
2007-02-22 16:39:03 +00:00
2007-03-01 20:26:43 +00:00
2007-02-22 16:22:15 +00:00
2007-03-01 20:25:32 +00:00
2007-03-04 04:41:04 +00:00
2007-02-28 07:40:50 +00:00