Teach the dag mechanism that this:
authorChris Lattner <sabre@nondot.org>
Mon, 11 Apr 2005 20:29:59 +0000 (20:29 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 11 Apr 2005 20:29:59 +0000 (20:29 +0000)
commitbd0781ed12dd817f760065e3ac2dcff12fb29440
tree960d8d6077fa9bb9b6aad9460a9d9f4db7132937
parentee27f57a6a4dd7fa9259b3604f563907da1f65ef
Teach the dag mechanism that this:

long long test2(unsigned A, unsigned B) {
        return ((unsigned long long)A << 32) + B;
}

is equivalent to this:

long long test1(unsigned A, unsigned B) {
        return ((unsigned long long)A << 32) | B;
}

Now they are both codegen'd to this on ppc:

_test2:
        blr

or this on x86:

test2:
        movl 4(%esp), %edx
        movl 8(%esp), %eax
        ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21231 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp