This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/43597] Move and compare with 0 can be combined



------- Comment #4 from steven at gcc dot gnu dot org  2010-03-31 22:49 -------
It's not very hard to add a define_peephole2 pattern for this case also,
although it's a bit of a hack.

I'm not even sure if it would handle the case cmp+mov and mov+cmp case -- does
peephole2 care about the order of the insns? If so, then you'd really need even
2 new define_peephole2's. You'd almost think we need a post-reload combine,
yuck... :-)

OTOH there are already a few define_peephole2's in arm.md to catch this kind of
simple optimization that combine fails to handle, so it's apparently
acceptable. And there is no easy way around this otherwise. I can't think of a
way to teach combine when it maybe could be should be to apply combine
transformations to likely-spilled regs. 


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernds at gcc dot gnu dot
                   |                            |org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]