OSDN Git Service

Fold (x & 8) != 0 and (x & 8) == 8 into (x & 8) >> 3.
authorChris Lattner <sabre@nondot.org>
Thu, 21 Apr 2005 06:12:41 +0000 (06:12 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 21 Apr 2005 06:12:41 +0000 (06:12 +0000)
commit1c2a9b95dc73c6fd11052e384ea5b10d011abb66
tree44422d54bef2ebd163b44d747d5952a7313a8b65
parent956db27a63a5f105c12787098dbe713747ed0528
Fold (x & 8) != 0 and (x & 8) == 8  into (x & 8) >> 3.

This turns this PPC code:

        rlwinm r2, r3, 0, 28, 28
        cmpwi cr7, r2, 8
        mfcr r2
        rlwinm r3, r2, 31, 31, 31

into this:

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

Next up, nuking the extra and.

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