------- Comment #7 from ebotcazou at gcc dot gnu dot org 2010-03-14 21:40
-------
> So, the solution is to teach loop2_invariant to also look into REG_EQUAL notes
> if the insn is _really_ invariant or eventually clear REG_EQUAL notes when
> insn is moved out of the loop.
Both should already happen though, see move_invariant_reg:
/* If there is a REG_EQUAL note on the insn we just moved, and
insn is in a basic block that is not always executed, the note
may no longer be valid after we move the insn.
Note that uses in REG_EQUAL notes are taken into account in
the computation of invariants. Hence it is safe to retain the
note even if the note contains register references. */
if (! inv->always_executed
&& (note = find_reg_note (inv->insn, REG_EQUAL, NULL_RTX)))
remove_note (inv->insn, note);
so there is apparently a flaw somewhere.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43360