https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110751
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|richard.sandiford at arm dot com | --- Comment #39 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- (In reply to Richard Biener from comment #34) > On RTL there are "special" RTXen used for this kind of stuff, like > (use:mode ..) or (clobber const0_rtx), but I'm the wrong person to > ask which one would be most appropriate for a general operand in > an otherwise generic instruction. Maybe Richard has a guess. I think the best bet with existing RTL is (scratch:<MODE>). It's not an exact fit for current usage (or for the documentation), but it's similar in spirit to the cratch in (mem:BLK (scratch:P)) (which also isn't an exact match for the documentation). I don't expect this to work out of the box. Some changes to target-independent code will be needed. But if we restrict this use to expanders for now, the changes should be relatively small. I think the main thing would be to make maybe_legitimize_operand turn a scratch rtx into a fresh pseudo if the predicate doesn't accept a scratch. We'd then be restoring the semantics of an uninitialised SSA_NAME. If we did that, I think we could convert uninitialised SSA_NAMEs into SCRATCHes for everything that goes through expand_fn_using_insn. There should be no need to restrict it to COND_* functions.