https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92510
--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- (In reply to Segher Boessenkool from comment #5) > (In reply to Jakub Jelinek from comment #4) > > I don't mind if simplify_subreg doesn't call native_encode_rtx in the cases > > where it ICEs and instead fails. > > I don't think native_encode_rtx (or simplify_immed_subreg) should ICE for > any valid input. This is valid input, for this API. As Jakub mentioned in comment 1, the native_encode_rtx ICE is coming from the call: simplify_subreg (DImode, const1_rtx, V1DImode, 0) // (outermode, op, innermode, byte) i.e. the caller is claiming that the inner const1_rtx has mode V1DI. And that can't be true, because vector constants have to be const_vectors rather than const_ints. (The combination of outermode, innermode and op are fine of course. The problem is "just" that the given innermode doesn't match the inner rtx.) So IMO the ICE is justified and we shouldn't change change simplify_subreg to handle cases in which innermode doesn't tally with op/GET_MODE (op).