https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118892
--- Comment #10 from Richard Sandiford <rsandifo at gcc dot gnu.org> --- (In reply to Tamar Christina from comment #9) > I swear that was something that was fixed. But in any case, the simplest > fix is to force it into a reg again indeed. > > I'm slightly worried that this then relies on the intermediate copy being > removed but such is life. This sounds like you're planning to use force_reg, but I agree with Andrew that the patch in comment 6 is the right fix. That will only create a new register if one is needed to satisfy subreg semantics. The normal case will still avoid a temporary.