On 02/10/2017 05:29 PM, Alan Modra wrote:
On Fri, Feb 03, 2017 at 01:55:33AM -0700, Jeff Law wrote:
That seems pretty pessimistic -- do we have dominance information at this
point? If so we could check that the assignment to the register dominates
the use. If they are in the same block, then you have to look at LUIDs or
somesuch.
That would address the problem you're trying to solve without pessimizing
the code.
Fair enough. Revised and regression tested x86_64-linux.
PR rtl-optimization/79286
* ira.c (def_dominates_uses): New function.
(update_equiv_regs): Don't create an equivalence for insns that
may trap where the register def does not dominate the use.
testsuite/
* gcc.c-torture/execute/pr79286.c: New.
Thanks. Installed.
I'm slightly concerned about the test and how it'll behave on targets
with small address spaces. If it's a problem we can fault in adjustments.
jeff