This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/42879] Replace "tst r3, 1" with "lsl r3, r3, 31" in thumb2
- From: "ramana at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2010 23:32:12 -0000
- Subject: [Bug target/42879] Replace "tst r3, 1" with "lsl r3, r3, 31" in thumb2
- References: <bug-42879-17659@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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