input_operand accepts an arbitrary integer constant only once register
allocation is under way, since before that a constant that needs more
than one instruction has to stay in its unsplit form. It tested
reload_in_progress, which LRA never sets, so under LRA the predicate
fell back to add_operand and rejected constants that only the
post-allocation splitter can handle.
LRA re-materializing an invariant (lra_undo_inheritance) then emitted an
unrecognizable (set (reg:DI) (const_int 0xffffffff00000000)) and tripped
the USE/CLOBBER/ASM_INPUT assertion in lra_set_insn_recog_data. Test
for lra_in_progress as well; the constant is split as before, into
lda + sll here. Seen compiling glibc's nss/nss_module.c at -O2
-mcpu=ev67 with LRA.
This has no effect until LRA is enabled by the next patch.
gcc/ChangeLog:
* config/alpha/predicates.md (input_operand): Test lra_in_progress
in the CONST_INT and CONST_VECTOR cases.
---
gcc/config/alpha/predicates.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/alpha/predicates.md b/gcc/config/alpha/predicates.md
index 68e3ac69f2a..7ca3a6075d2 100644
--- a/gcc/config/alpha/predicates.md
+++ b/gcc/config/alpha/predicates.md
@@ -201,14 +201,14 @@
return op == CONST0_RTX (mode);
case CONST_VECTOR:
- if (reload_in_progress || reload_completed)
+ if (lra_in_progress || reload_in_progress || reload_completed)
return alpha_legitimate_constant_p (mode, op);
return op == CONST0_RTX (mode);
case CONST_INT:
if (mode == QImode || mode == HImode)
return true;
- if (reload_in_progress || reload_completed)
+ if (lra_in_progress || reload_in_progress || reload_completed)
return alpha_legitimate_constant_p (mode, op);
return add_operand (op, mode);
--
2.56.1