diff options
author | Alan Hayward <alan.hayward@arm.com> | 2016-07-08 08:50:24 +0000 |
---|---|---|
committer | Alan Hayward <alahay01@gcc.gnu.org> | 2016-07-08 08:50:24 +0000 |
commit | 3c3ecf52a6394009877a6771c871603c13fd035f (patch) | |
tree | 0375b18fd1d04e382b22b64f870a25e9363cc439 /gcc/tree-vect-loop.c | |
parent | 03e6ca4873c52eaba58933d317d425891f71cee0 (diff) | |
download | gcc-3c3ecf52a6394009877a6771c871603c13fd035f.zip gcc-3c3ecf52a6394009877a6771c871603c13fd035f.tar.gz gcc-3c3ecf52a6394009877a6771c871603c13fd035f.tar.bz2 |
re PR debug/71667 (ICE in as_a, at is-a.h:192 w/ -g -O2 -ftree-vectorize)
2016-07-08 Alan Hayward <alan.hayward@arm.com>
gcc/
PR tree-optimization/71667
* tree-vect-loop.c (vectorizable_live_operation): ignore DEBUG stmts
testsuite/
PR tree-optimization/71667
* gcc.dg/vect/pr71667.c: New
From-SVN: r238160
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 63c002e..97acf3c 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -6354,11 +6354,12 @@ vectorizable_live_operation (gimple *stmt, : gimple_get_lhs (stmt); lhs_type = TREE_TYPE (lhs); - /* Find all uses of STMT outside the loop - there should be exactly one. */ + /* Find all uses of STMT outside the loop - there should be at least one. */ auto_vec<gimple *, 4> worklist; FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs) - if (!flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))) - worklist.safe_push (use_stmt); + if (!flow_bb_inside_loop_p (loop, gimple_bb (use_stmt)) + && !is_gimple_debug (use_stmt)) + worklist.safe_push (use_stmt); gcc_assert (worklist.length () >= 1); bitsize = TYPE_SIZE (TREE_TYPE (vectype)); |