On Thu, Jun 06, 2019 at 05:06:35PM +0100, Richard Earnshaw (lists) wrote: > The reason combine doesn't catch this is because at the time it runs the > MOV is in a different basic block. Later on it is sunk into the same > basic block, but it's then too late to do the merge.
Or you could say the MOV didn't even exist yet: the insn that is merged by the peephole is created by the prologue code, eventually. This isn't really a target problem, it is very much generic, but I don't see a better solution than a peephole either. Segher