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

--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-04-11 22:48:18 
UTC ---
Created attachment 27138
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27138
Examples

In addition to the original case, I've noticed that there are more weird things
happening with DImode comparisons in general.  The attached test cases do not
cover all the possible combinations, but basically the -mcbranchdi and
-mcmpeqdi options in combination with -O2 and -Os seem not to behave as
originally intended.
With -O2 the cmpeqdi_t pattern is never used no matter which options are
specified.  I think it is the split below the cmpeqdi_t insn in sh.md, that
does this.  The code of the cmpeqdi_t insn seems already quite optimal, except
that the first cmp / tst insn should be emitted separately to get potentially
better scheduling.

Moreover, there is an unnamed tstdi_t pattern which never gets used by combine.
 What happens there, is that the and:DI is split by the middle-end into 2x
and:SI at a very early stage.  I think this is because there is no and:DI insn
defined.

Reply via email to