[Bug target/80725] [7/8 Regression] s390x ICE on alsa-lib

krebbel at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 22 14:52:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80725

--- Comment #3 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
process_address_1 does not do any address reloading because it only checks the
first constraint letter whether it is an extra address constraint or not. In
our case ("a,ZR") it is a register constraint. Hence no reloading to make the
address valid.

Before adding ZR the reload was issued as usual for register constraints and
not as part of address reloading. With adding the broken ZR constraint there
was a constraint which magically matched also the FPR hence no reload is being
generated anymore.

LRA needs a way to recognize what is supposed to be an address to trigger the
address reloading. Reload as well as LRA rely on the first constraint letter to
be an address constraint for that.

I see 3 potential fixes:

1. Since ZR is an extra address constraint swapping the two alternatives in the
pattern makes the problem disappear.

2. constraint 'a' needs to become an extra address constraint as well.

3. LRA/reload could check if *any* of the constraints is an extra address
constraint .

If it isn't 3 we probably should document that the address constraints must
come first. Or perhaps that all the constraints for addresses need to be
address constraints.


More information about the Gcc-bugs mailing list