[Bug target/102154] [12 Regression] ICE in extract_insn, at recog.c:2769 since r12-3277-gd2874d905647a1d146dafa60199d440e837adc4d

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 8 17:51:04 GMT 2021


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

--- Comment #17 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Hongtao.liu from comment #15)
> as discussed in
> https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578437.html, allow
> specific float-int subreg seems weird.

Indiscriminately allowing all of them is a bad idea.  No machine (that has
more than just integer hardware) can actually use those, resulting in ICEs
(like here) or inefficient code generated by reload, or a mix, or worse.

> And when i look the pattern, it also seems to be strange to disallow subreg
> in operands[1], IMHO things like TARGET_ALLOW_SF_SUBREG should be done in
> TARGET_CAN_CHANGE_MODE_CLASS, so reload/lra will do the right thing.

No.  We usually have this in the predicates.  But there simply is no even
remotely efficient way to do such moves, so we should not pretend there is.

It would be nicer to disallow such subregs elsewhere, sure.

(And rs6000_can_change_mode_class already disallows this move fwiw).


More information about the Gcc-bugs mailing list