This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/64493] [4.8/4.9/5 Regression] ICE at -O3 on x86_64-linux-gnu
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Jan 2015 12:22:01 +0000
- Subject: [Bug tree-optimization/64493] [4.8/4.9/5 Regression] ICE at -O3 on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-64493-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I tried to make a runtime testcase that tests for proper vectorization but
all vectorized code ends up being dead. Nevertheless the following fixes
the ICE:
Index: gcc/tree-vect-loop.c
===================================================================
--- gcc/tree-vect-loop.c (revision 219520)
+++ gcc/tree-vect-loop.c (working copy)
@@ -4580,7 +4580,10 @@ vect_finalize_reduction:
&& !STMT_VINFO_LIVE_P (exit_phi_vinfo))
|| double_reduc);
- STMT_VINFO_VEC_STMT (exit_phi_vinfo) = epilog_stmt;
+ if (double_reduc)
+ STMT_VINFO_VEC_STMT (exit_phi_vinfo) = inner_phi;
+ else
+ STMT_VINFO_VEC_STMT (exit_phi_vinfo) = epilog_stmt;
if (!double_reduc
|| STMT_VINFO_DEF_TYPE (exit_phi_vinfo)
!= vect_double_reduction_def)
and the generated code looks reasonable. I think we don't really support
the case where the inner reduction result is used in the outer loop (but
in !relevant stmts which end up dead).
Well. Not 100% sure.