https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77527
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, what I see happening is that lim2 creates a v_lsm.5 VAR_DECL here, and it is is_gimple_reg and only used in SSA_NAMEs. As it is a wide vector, it is BLKmode in the end, and during expansion emit_block_move called because of an assignment to it calls mark_decl_addressable on the VAR_DECL (which queues TREE_ADDRESSABLE set for after expansion). The v_lsm.5 VAR_DECL then appears in MEM_EXPRs of various MEMs, but because the VAR_DECL has been originally gimple register, it doesn't have DECL_RTL set during expansion (each SSA_NAME for it has its own I bet). Then when nonoverlapping_memrefs_p is called on it during DSE, it sees the MEM_EXPR is not is_gimple_reg and uses DECL_RTL, which ICEs, because it doesn't have the rtl and is not meant to get rtl created that way. I wonder if the queued addressable decls set to TREE_ADDRESSABLE after it shouldn't have DECL_RTL set at that point (but to which one), or alternatively if nonoverlapping_memrefs_p should use DECL_RTL_IF_SET instead and somehow deal with the fact when that returns NULL_RTX (dunno if it should handle that conservatively, by giving up, or if there are cases which it could still handle).