diff options
author | Richard Guenther <rguenther@suse.de> | 2010-12-02 16:23:20 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-12-02 16:23:20 +0000 |
commit | 6dbbece65abb5765fedddfe4ab01950b61d05c57 (patch) | |
tree | 9731011d784b5a20bbfc11e4a58be14bb690acd5 /gcc/tree-vect-stmts.c | |
parent | 3b38fb7c7dc653b91b755d8f60155f3404b70e2e (diff) | |
download | gcc-6dbbece65abb5765fedddfe4ab01950b61d05c57.zip gcc-6dbbece65abb5765fedddfe4ab01950b61d05c57.tar.gz gcc-6dbbece65abb5765fedddfe4ab01950b61d05c57.tar.bz2 |
re PR tree-optimization/46723 (internal compiler error: in get_initial_def_for_induction, at tree-vect-loop.c:2431)
2010-12-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46723
* tree-vect-loop.c (get_initial_def_for_induction): Strip
conversions from the induction evolution and apply it to
the result instead.
* tree-vect-stmts.c (vect_get_vec_def_for_operand): Handle
assigns for induction defs.
* gcc.dg/torture/pr46723.c: New testcase.
From-SVN: r167377
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index b1650d2ee..e5bfcbe 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -1102,8 +1102,10 @@ vect_get_vec_def_for_operand (tree op, gimple stmt, tree *scalar_def) /* Get the def from the vectorized stmt. */ def_stmt_info = vinfo_for_stmt (def_stmt); vec_stmt = STMT_VINFO_VEC_STMT (def_stmt_info); - gcc_assert (vec_stmt && gimple_code (vec_stmt) == GIMPLE_PHI); - vec_oprnd = PHI_RESULT (vec_stmt); + if (gimple_code (vec_stmt) == GIMPLE_PHI) + vec_oprnd = PHI_RESULT (vec_stmt); + else + vec_oprnd = gimple_get_lhs (vec_stmt); return vec_oprnd; } |