OSDN Git Service

Use cute tblgen tricks to make zap handling more powerful. Specifically,
authorChris Lattner <sabre@nondot.org>
Wed, 11 Oct 2006 05:13:56 +0000 (05:13 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 11 Oct 2006 05:13:56 +0000 (05:13 +0000)
commitd615ded96ed2ee8e6537a7132a5364a29f37b46e
tree434eebae0d704013ed98a1c0ae185ff8cf169d06
parent3d2da9a426810e48fd797eaa385a5f072ccd5b69
Use cute tblgen tricks to make zap handling more powerful.  Specifically,
when the dag combiner simplifies an and mask, notice this and allow those bits
to be missing from the zap mask.

This compiles Alpha/zapnot4.ll into:

        sll $16,3,$0
        zapnot $0,3,$0
        ret $31,($26),1

instead of:

        ldah $0,1($31)
        lda $0,-8($0)
        sll $16,3,$1
        and $1,$0,$0
        ret $31,($26),1

It would be *really* nice to replace the hunk of code in the
AlphaISelDAGToDAG.cpp file that matches (and (srl (x, C), c2) into
(SRL (ZAPNOTi)) with a similar pattern, but I've spent enough time poking
at alpha.  Make andrew will do this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30875 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Alpha/AlphaISelDAGToDAG.cpp
lib/Target/Alpha/AlphaInstrInfo.td