https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71768
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Also the cost model seems wrong. If the register can be rematerialized (i.e. it has REG_EQUIV), the memory_cost of the actual initialization insn should not be accounted IMO.