aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-12-06 10:21:13 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-12-06 10:21:13 +0100
commit0d3ce69b79ab7d7ea4a2fc4ed5e983ea6efcfa69 (patch)
tree7f9d8dc400caf600f75a0bb3d128363ce3a62a6c /gcc/tree-vect-loop.c
parentd7ae3739a200ea1c90ca20afbebfc627ee32cf49 (diff)
downloadgcc-0d3ce69b79ab7d7ea4a2fc4ed5e983ea6efcfa69.zip
gcc-0d3ce69b79ab7d7ea4a2fc4ed5e983ea6efcfa69.tar.gz
gcc-0d3ce69b79ab7d7ea4a2fc4ed5e983ea6efcfa69.tar.bz2
re PR tree-optimization/78675 (ICE: verify_gimple failed (error: integral result type precision does not match field size of BIT_FIELD_REF))
2016-12-06 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/78675 * tree-vect-loop.c (vectorizable_live_operation): For VECTOR_BOOLEAN_TYPE_P vectype use integral type with bitsize precision instead of TREE_TYPE (vectype) for the BIT_FIELD_REF. * gcc.c-torture/execute/pr78675.c: New test. * gcc.target/i386/pr78675-1.c: New test. * gcc.target/i386/pr78675-2.c: New test. From-SVN: r243283
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 4150b0d..6e8b89c 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -6601,8 +6601,10 @@ vectorizable_live_operation (gimple *stmt,
/* Create a new vectorized stmt for the uses of STMT and insert outside the
loop. */
gimple_seq stmts = NULL;
- tree new_tree = build3 (BIT_FIELD_REF, TREE_TYPE (vectype), vec_lhs, bitsize,
- bitstart);
+ tree bftype = TREE_TYPE (vectype);
+ if (VECTOR_BOOLEAN_TYPE_P (vectype))
+ bftype = build_nonstandard_integer_type (tree_to_uhwi (bitsize), 1);
+ tree new_tree = build3 (BIT_FIELD_REF, bftype, vec_lhs, bitsize, bitstart);
new_tree = force_gimple_operand (fold_convert (lhs_type, new_tree), &stmts,
true, NULL_TREE);
if (stmts)