add a little peephole optimization. This allows us to codegen:
authorChris Lattner <sabre@nondot.org>
Sat, 9 Apr 2005 21:43:54 +0000 (21:43 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 9 Apr 2005 21:43:54 +0000 (21:43 +0000)
commita2daa8c78d8749d6b4743e8bbfe4d522cd13a669
tree32677f7b93e9b47dbdadad390d8dc4fca7e93df2
parent91277ea45c7a6f052dd588edee51644f23194619
add a little peephole optimization.  This allows us to codegen:

int a(short i) {
        return i & 1;
}

as

_a:
        andi. r3, r3, 1
        blr

instead of:

_a:
        rlwinm r2, r3, 0, 16, 31
        andi. r3, r2, 1
        blr

on ppc.  It should also help the other risc targets.

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