https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89752
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The following patch fixes the remaining ICE for me:
--- gcc/lra-constraints.c.jj 2019-03-16 22:17:21.060937047 +0100
+++ gcc/lra-constraints.c 2019-03-19 11:49:11.982058568 +0100
@@ -2350,6 +2350,8 @@ process_alt_operands (int only_alternati
break;
reg:
+ if (mode == BLKmode)
+ break;
this_alternative = reg_class_subunion[this_alternative][cl];
IOR_HARD_REG_SET (this_alternative_set,
reg_class_contents[cl]);
@@ -2360,8 +2362,6 @@ process_alt_operands (int only_alternati
IOR_HARD_REG_SET (this_costly_alternative_set,
reg_class_contents[cl]);
}
- if (mode == BLKmode)
- break;
winreg = true;
if (REG_P (op))
{
What in my understanding happens is that even when the r constraint for the
BLKmode MEM doesn't win, this_alternative is still updated (to GENERAL_REGS in
this case) and as the m constraint matches, we still process it as if
GENERAL_REGS is an option. It is not, BLKmode must live in memory.