diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-01-08 09:37:17 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-01-08 09:37:17 +0100 |
commit | 262a363ff9f03262fe5a8420fa53bd10cb4306d6 (patch) | |
tree | 0a80aa1d1fc5c04316113d0580d1a82f7b860e8a /gcc/tree-vect-slp.c | |
parent | 6e1f093f7466ee77557e5ffad9b3ab9ae945e4e3 (diff) | |
download | gcc-262a363ff9f03262fe5a8420fa53bd10cb4306d6.zip gcc-262a363ff9f03262fe5a8420fa53bd10cb4306d6.tar.gz gcc-262a363ff9f03262fe5a8420fa53bd10cb4306d6.tar.bz2 |
re PR tree-optimization/69083 (ICE at -O3 in 64-bit mode on x86_64-linux-gnu (verify_gimple failed))
PR tree-optimization/69083
* tree-vect-slp.c (vect_get_constant_vectors): For
VECTOR_BOOLEAN_TYPE_P assert op is fold_convertible_p to vector_type's
element type. If op is fold_convertible_p to vector_type's element
type, use NOP_EXPR instead of VCE.
* gcc.dg/vect/pr69083.c: New test.
From-SVN: r232153
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index cb61d14..b029f61 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2967,9 +2967,22 @@ vect_get_constant_vectors (tree op, slp_tree slp_node, { tree new_temp = make_ssa_name (TREE_TYPE (vector_type)); gimple *init_stmt; - op = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (vector_type), op); - init_stmt - = gimple_build_assign (new_temp, VIEW_CONVERT_EXPR, op); + if (VECTOR_BOOLEAN_TYPE_P (vector_type)) + { + gcc_assert (fold_convertible_p (TREE_TYPE (vector_type), + op)); + init_stmt = gimple_build_assign (new_temp, NOP_EXPR, op); + } + else if (fold_convertible_p (TREE_TYPE (vector_type), op)) + init_stmt = gimple_build_assign (new_temp, NOP_EXPR, op); + else + { + op = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (vector_type), + op); + init_stmt + = gimple_build_assign (new_temp, VIEW_CONVERT_EXPR, + op); + } gimple_seq_add_stmt (&ctor_seq, init_stmt); op = new_temp; } |