------- 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