This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 24 Feb 2015 18:41:10 +0000
- Subject: [Bug tree-optimization/61917] [4.9/5 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in vectorizable_reduction, at tree-vect-loop.c:4913
- Auto-submitted: auto-generated
- References: <bug-61917-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61917
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu.org
--- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> ---
It is the same bug. All is related to the issue that 'dt' might become
'vect_internal_def' with 'orig_stmt' being NULL.
By extending the assert at line 4993 as 'gcc_assert (orig_stmt || dt ==
vect_internal_def);' solves the issue for me for both provided samples.
Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c (Revision 220748)
+++ tree-vect-loop.c (Arbeitskopie)
@@ -4990,7 +4990,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_i
/* For pattern recognized stmts, orig_stmt might be a reduction,
but some helper statements for the pattern might not, or
might be COND_EXPRs with reduction uses in the condition. */
- gcc_assert (orig_stmt);
+ gcc_assert (orig_stmt || dt == vect_internal_def);
return false;
}
if (!found_nested_cycle_def)