On 12/02/16 13:33, Bernd Schmidt wrote:
On 02/12/2016 02:18 PM, Jiong Wang wrote:

    PR rtl-optimization/69752
    * ira.c (update_equiv_regs): When looking for more than a single
SET,
    also take other side effects into account.

Will it be better that we don't remove the insn if it has side-effect
instead of don't record the equiv?

This can offer more equiv for later rtl optimization?

It's an option I considered, but for stage4 this seems like the safest fix. It's not like this is a very common problem, the effect should be negligible.

I see, thanks for the explanation.

From my quick test, this patch actually generate code slightly better.

The interesting thing I found is if we still initialize the equiv, then
a later use in the testcase will be rematerialized, but the equiv
constant -1044200508 is forced into memory, thus the rematerialization
is a load from memory. Instead, if we don't initialize the equiv then
the register contains the reusable value will be kept alive.



Bernd


Reply via email to