[Bug target/36133] GCC creates suboptimal ASM : Code includes unneeded TST instructions
ams at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Nov 10 13:03:00 GMT 2008
------- Comment #9 from ams at gcc dot gnu dot org 2008-11-10 13:01 -------
> > This tst instruction is unneeded as the LSR is setting the flags correctly
> > already.
>
> This is NOT correct. LSL does write to the condition codes, but not all of it.
> In particular, the bit involved in the not-equal test is not set.
Hmm, on re-reading the manual, I seem to have misunderstood this. The
description of the instruction states certain bits are set, but then, on the
next page the table shows all the bits being updated.
I'm going to need to think about this one some more.
Sorry for the noise :(
Andrew
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36133
More information about the Gcc-bugs
mailing list