https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77499

--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to avieira from comment #0)
> PS: I am not sure I completely understand the way the last_set_value stuff
> works for pseudo's in combine, but it looks to me like each instruction is
> visited in a top down order per basic block again in a top-down order.

Yeah.

> And
> each pseudo will have its 'last_set_value' according to the last time that
> register was seen being set, without any regards to loop or proper dataflow
> analysis. Can anyone explain to me how this doesnt go horribly wrong?

It only allows a last set value when either:
- It is set in the same extended basic block, but before this insn;
- The register is set exactly once, and is not a function parameter.

This might also be why it optimises less well now for you?

Reply via email to