Jeff Law wrote: > My only concern here would be cases where we don't end up eliminating FP > to SP. But I'd think it's unlikely that we'd have enough auto-inc > opportunities on the frame pointer for it to matter much anyway.
What kind of case are you thinking of? Whether it is SP or FP doesn't matter, we cannot copy propagate the pointer: add x1, fp, 32 strb w0, [x1, -1]! Not even if the elimination offset is zero: mov x1, fp strb w0, [x1, 31]! Basically an independent add is better than the above: strb w0, [fp, 31] add x1, fp, 31 I think the phase is still overly aggressive and there are more cases where it doesn't make sense to use auto increment. For example you will extra moves just like the 2nd case above when it's not the last use of the source. Wilco