https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123108
--- Comment #11 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- LRA and old reload are driven by constraints not operand predicates. Also constraints permits more detail restrictions than predicates. In many cases it is impossible to describe insn by only predicates, especially insn with several alternatives like "r,m" for one operand and "m,r" for another operand. Whatever insn operands are, LRA and old reload will make reloads transform insn into one satisfying constraints. So insn description should always have constraints unless the operand can be really anything. Even if the PR will be fixed somewhere else, I believe riscv GCC with absent insn constraints will run into some another problem soon (not by applying equivalence substitution). If you'd have 'r' constraint for substituted const 32, IRA would reload it into register again but the reload insn would be closer than the removed equivalence insn. I think not using constraints for riscv insns is a serious mistake.
