This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/47271] [4.6 Regression] if-conversion removes a test (if), the function generates invalid outputs
- From: "spop at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Jan 2011 20:15:15 +0000
- Subject: [Bug tree-optimization/47271] [4.6 Regression] if-conversion removes a test (if), the function generates invalid outputs
- Auto-submitted: auto-generated
- References: <bug-47271-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47271
--- Comment #14 from Sebastian Pop <spop at gcc dot gnu.org> 2011-01-24 20:14:55 UTC ---
Right, thanks for catching that:
I handled it only in the first place and not in the second:
gcc_assert (bb == bb->loop_father->header
|| bb_postdominates_preds (bb));
I am seeing that this check is redundant, as just before calling
predicate_scalar_phi, we have:
if (bb == loop->header)
continue;
As this is in a gcc_assert I don't mind the extra check, just to
make it more clear when somebody reads this code again.
If so, I will send the amended patch to gcc-patches.