Improve and elimination. On PPC, for:
authorChris Lattner <sabre@nondot.org>
Thu, 21 Apr 2005 06:28:15 +0000 (06:28 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 21 Apr 2005 06:28:15 +0000 (06:28 +0000)
commit588bbbffa1cf29201c72b8b3f04c6330f4bde2dd
tree409c6931f1e1972962f4df6969f2af340b2a1f47
parent1c2a9b95dc73c6fd11052e384ea5b10d011abb66
Improve and elimination.  On PPC, for:

bool %test(int %X) {
        %Y = and int %X, 8
        %Z = setne int %Y, 0
        ret bool %Z
}

we now generate this:

        rlwinm r2, r3, 0, 28, 28
        srwi r3, r2, 3

instead of this:

        rlwinm r2, r3, 0, 28, 28
        srwi r2, r2, 3
        rlwinm r3, r2, 0, 31, 31

I'll leave it to Nate to get it down to one instruction. :)

---------------------------------------------------------------------

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