On 05/03/2016 12:45 PM, Alan Modra wrote:
PR rtl-optimization/70890 * ira.c (combine_and_move_insns): When moving def_insn, remove equivs on use_insn.
I'm not sure yet, but it looks to me like this tweaks the wrong place.
diff --git a/gcc/ira.c b/gcc/ira.c index a38e67e..cf5be35 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -3742,6 +3742,16 @@ combine_and_move_insns (void) if (use_insn == BB_HEAD (use_bb)) BB_HEAD (use_bb) = new_insn; + /* Since regno now dies in use_insn we can't leave any + equivalence for a reg set by use_insn as the equivalence + must reference regno. */
"now dies" is the first part that I stumbled over. Doesn't it die there regardless of the move? And if it dies, why did we make this equivalence in the first place? It seems we should fix the place that makes incorrect equivalences rather than removing them here (where it seems likely we'll catch only a partial set).
Maybe I'm wrong and this could be cleared up by showing more steps in the transformation sequence.
Bernd