diff options
author | Richard Biener <rguenther@suse.de> | 2020-10-15 10:58:41 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-10-15 11:49:38 +0200 |
commit | 852dce060860d988f4d8007be97b7b38e51f9900 (patch) | |
tree | 13b26d02fef3e322da11de21fe851cef2869c9d1 /gcc/tree-vect-loop.c | |
parent | d8394e2aa265c9e06b8362a84e77270dd182f638 (diff) | |
download | gcc-852dce060860d988f4d8007be97b7b38e51f9900.zip gcc-852dce060860d988f4d8007be97b7b38e51f9900.tar.gz gcc-852dce060860d988f4d8007be97b7b38e51f9900.tar.bz2 |
Fix ICE in vectorizable_live_operation
This fixes the case where the insertion iterator for the live stmt
is the end of a BB by adjusting the dominance query to the definition
of the def we're substituting.
2020-10-15 Richard Biener <rguenther@suse.de>
* tree-vect-loop.c (vectorizable_live_operation): Adjust
dominance query.
* gcc.dg/vect/bb-slp-52.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 0a315e2..991fd45 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8395,8 +8395,11 @@ vectorizable_live_operation (vec_info *vinfo, were not code-generated yet so it is not too bad. ??? In fact we'd likely want to avoid this situation in the first place. */ - if (gimple_code (use_stmt) != GIMPLE_PHI - && !vect_stmt_dominates_stmt_p (gsi_stmt (*gsi), use_stmt)) + if (TREE_CODE (new_tree) == SSA_NAME + && !SSA_NAME_IS_DEFAULT_DEF (new_tree) + && gimple_code (use_stmt) != GIMPLE_PHI + && !vect_stmt_dominates_stmt_p (SSA_NAME_DEF_STMT (new_tree), + use_stmt)) { enum tree_code code = gimple_assign_rhs_code (use_stmt); gcc_assert (code == CONSTRUCTOR |