[Bug tree-optimization/47271] [4.6 Regression] if-conversion removes a test (if), the function generates invalid outputs

spop at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 24 21:07:00 GMT 2011


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.



More information about the Gcc-bugs mailing list