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

--- Comment #5 from Jim Wilson <wilson at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> Hmm, but shouldn't we instead fix combine to record not the reg rtx but the
> regno for UNDO_MODE?  Because nothing prevents this from happening elsewhere
> (even in combine itself?).

Combine doesn't call gen_reg_rtx, other than make_more_copies, and splitters
aren't supposed to either.  As Segher mentioned, if a define_split needs a
temporary it is supposed to add a clobber of a match_operand.

I tried an experiment, I set a global var at the start of combine_instructions,
cleared it at the end, added an abort to gen_reg_rtx if the var is set, and did
an x86 bootstrap.  It completed successfully.  A make check is running, but I
don't expect to hit the abort there either.

A RISC-V toolchain with my proposed fix added still fails as riscv_split_symbol
called from gen_split_13 has the same problem and needs a similar fix.

Reply via email to