This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/43360] [4.3/4.4/4.5 Regression] possible wrong code bug
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Mar 2010 21:40:19 -0000
- Subject: [Bug rtl-optimization/43360] [4.3/4.4/4.5 Regression] possible wrong code bug
- References: <bug-43360-12544@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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