re PR tree-optimization/22506 (ICE with -ftree-vectorize in var_ann, at tree-flow-inline.h:115)

PR tree-optimization/22506
        * tree-vectorizer.c (update_phi_nodes_for_guard2): Skip loop-closed
        phis whose argument is constant.

From-SVN: r102487
This commit is contained in:
Dorit Nuzman 2005-07-28 15:12:49 +00:00 committed by Dorit Nuzman
parent 0d9f15f1a0
commit 5bb1823dd4
4 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-07-28 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/22506
* tree-vectorizer.c (update_phi_nodes_for_guard2): Skip loop-closed
phis whose argument is constant.
2005-07-28 J"orn Rennecke <joern.rennecke@st.com>
PR rtl-optimization/18992

View File

@ -1,3 +1,8 @@
2005-07-28 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/22506
* gcc.dg/vect/ps22506.c: New test.
2005-07-28 Jakub Jelinek <jakub@redhat.com>
PR target/21149

View File

@ -0,0 +1,12 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
float x[3];
void foo()
{
int i;
for (i=0; i<5; ++i) x[i]=0;
for (i=0; i<4; ++i) ;
}

View File

@ -640,6 +640,10 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop,
{
orig_phi = update_phi;
orig_def = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
/* This loop-closed-phi actually doesn't represent a use
out of the loop - the phi arg is a constant. */
if (TREE_CODE (orig_def) != SSA_NAME)
continue;
orig_def_new_name = get_current_def (orig_def);
arg = NULL_TREE;