[Bug tree-optimization/84777] -Os inhibits all vectorization
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 9 11:06:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84777
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
IIRC the issue is that -Os inhibits most loop-header copying.
Can you provide a testcase that shows the issue please?
Can you check if the following patch fixes things for you?
Index: gcc/tree-ssa-loop-ch.c
===================================================================
--- gcc/tree-ssa-loop-ch.c (revision 258380)
+++ gcc/tree-ssa-loop-ch.c (working copy)
@@ -257,8 +257,7 @@ public:
/* opt_pass methods: */
virtual bool gate (function *fun)
{
- return flag_tree_ch != 0
- && (flag_tree_loop_vectorize != 0 ||
fun->has_force_vectorize_loops);
+ return flag_tree_loop_vectorize != 0 || fun->has_force_vectorize_loops;
}
/* Just copy headers, no initialization/finalization of loop structures. */
More information about the Gcc-bugs
mailing list