https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67462
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Bernd Schmidt from comment #6) > That does look dodgy. It's also really old, from when rtx_cost was part of > cse.c. Kenner added it along with many other changes in r754 in 1992. > > See what happens to codegen if you just strip SUBREGs before this switch and > lose the MODES_TIEABLE thing? Well, if the SUBREG modes are not tieable and it is expected that reload will have to add some reload insns to read those subregs or store them, I think it is appropriate to have some non-zero cost for them. Even for the integral modes, if the RA chooses say on x86-64 to allocate them say in SSE registers then trying to read smaller modes out of them might have some cost. It is just that if they happen to be allocated in i?86 GPRs that the cost is zero. And, with the stv pass that doesn't have to happen as often as in the past. I'd say it is too dangerous so late in stage3 to change the costs now, and for GCC 7 perhaps we should just allow the target hook to guess the cost of the subreg.