This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
- From: "irar at il dot ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 2 Nov 2010 08:32:36 +0000
- Subject: [Bug tree-optimization/46213] [4.6 Regression] gfortran.dg/aliasing_array_result_1.f90 ICE: in vectorizable_reduction, at tree-vect-loop.c:4046 with custom compiler flags
- Auto-submitted: auto-generated
- References: <bug-46213-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46213
Ira Rosen <irar at il dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |irar at gcc dot gnu.org
|gnu.org |
--- Comment #4 from Ira Rosen <irar at il dot ibm.com> 2010-11-02 08:32:15 UTC ---
I am testing:
Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c (revision 166172)
+++ tree-vect-loop.c (working copy)
@@ -1800,7 +1800,11 @@ vect_is_simple_reduction_1 (loop_vec_inf
simply rewriting this into "res += -x[i]". Avoid changing
gimple instruction for the first simple tests and only do this
if we're allowed to change code at all. */
- if (code == MINUS_EXPR && modify)
+ if (code == MINUS_EXPR
+ && modify
+ && (op1 = gimple_assign_rhs1 (def_stmt))
+ && TREE_CODE (op1) == SSA_NAME
+ && SSA_NAME_DEF_STMT (op1) == phi)
code = PLUS_EXPR;
if (check_reduction