[Bug target/42879] Replace "tst r3, 1" with "lsl r3, r3, 31" in thumb2

ramana at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 29 23:32:00 GMT 2010



------- Comment #2 from ramana at gcc dot gnu dot org  2010-01-29 23:32 -------
(In reply to comment #1)
> Could be done in a peephole if there's a scratch available for the destination.
> 

We already do this for Thumb1 don't we ? Turning on *tlobits_cbranch and the
appropriate bit in arm.c should be enough but GAS doesn't want to assemble lsl
r2,r3, #1 as a 16 bit instruction yet. 

cheers
Ramana


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42879



More information about the Gcc-bugs mailing list