[Bug tree-optimization/56273] [4.8 regression] Bogus -Warray-bounds warning
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 11 10:52:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-11 10:52:39 UTC ---
One of the reasons this all happens is of course that after complete unrolling
we miss a pass that does full redundancy removal and const/copy propagation.
For the latter we abuse VRP (but cripple it), for the former we have DOM,
but that is scheduled after VRP.
I wonder if we should simply move VRP after DOM. Like with
Index: gcc/passes.c
===================================================================
--- gcc/passes.c (revision 195938)
+++ gcc/passes.c (working copy)
@@ -1488,7 +1488,6 @@ init_optimization_passes (void)
NEXT_PASS (pass_lower_vector_ssa);
NEXT_PASS (pass_cse_reciprocals);
NEXT_PASS (pass_reassoc);
- NEXT_PASS (pass_vrp);
NEXT_PASS (pass_strength_reduction);
NEXT_PASS (pass_dominator);
/* The only const/copy propagation opportunities left after
@@ -1497,6 +1496,7 @@ init_optimization_passes (void)
only examines PHIs to discover const/copy propagation
opportunities. */
NEXT_PASS (pass_phi_only_cprop);
+ NEXT_PASS (pass_vrp);
NEXT_PASS (pass_cd_dce);
NEXT_PASS (pass_tracer);
as DOM also performs constant/copy propagation. That doesn't fix the
warning but makes the IL that we feed into VRP2 much more suitable to
its working.
A patch to disable the < -> != transform fixes this bug and I am going
to test that.
More information about the Gcc-bugs
mailing list