https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97286
--- Comment #9 from Richard Sandiford <rsandifo at gcc dot gnu.org> --- (In reply to ktkachov from comment #8) > Richard, do you think this is something early-ra in aarch64 is well-placed > to address? Or is there perhaps a realistic IRA solution? I don't think the RAs can handle the version in comment 3 without prepasses, since the loop does have two pseudos that are live on entry to the loop (d and c). I think we'd need a pass that tries to find cases where one pseudo register A is always a bitcast alias of another pseudo register B, and replace all references to A with subreg references to B. Or perhaps we could do the optimisation in gimple, so that there is only one loop-carried dependency coming into expand.