[llvm-commits] Thumb2 and-tst peephole optimization
gabor at mac.com
Tue Sep 21 17:27:25 CDT 2010
A non-text attachment was scrubbed...
Size: 3549 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100922/4a3ac9d4/attachment.obj
-------------- next part --------------
I am entering deeper waters with this patch, so I'd better put it
up to review...
I managed to eliminate the 'tst.w' instruction after a thumb2 'and'
by converting the latter to 'andS'.
Unfortunately the transformation is all but straightforward:
the 'tst.t' feeds on a register that is also ARM::COPYed and ends
up as the register argument to the 'and'.
So we have look through those copies to find the 'and'.
I am unsure whether I have gotten the logic right, as I want
to avoid a wildly branching algorithm and so I look for the
'and' only immediately behind the COPY.
Any hint how to get this coded up elegantly and efficiently
is welcome. The patch is attached.
More information about the llvm-commits