Make promoteOp work for CT*
authorAndrew Lenharth <andrewl@lenharth.org>
Wed, 4 May 2005 19:11:05 +0000 (19:11 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Wed, 4 May 2005 19:11:05 +0000 (19:11 +0000)
commitfecf095292991bdf9396fec474011446107f9813
tree18bba5717914b56ece8eb57ad8c66f518e5dabfd
parent693787a5ec14eb523a9c4a7653a34f1ff7df7f3e
Make promoteOp work for CT*

Proof?

ubyte %bar(ubyte %x) {
entry:
        %tmp.1 = call ubyte %llvm.ctlz( ubyte %x )
        ret ubyte %tmp.1
}

==>

zapnot $16,1,$0
CTLZ $0,$0
subq $0,56,$0
zapnot $0,1,$0
ret $31,($26),1

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