From f9674f3d59b2a61bd779632cd23679383a60a22f Mon Sep 17 00:00:00 2001 From: rsandifo Date: Mon, 18 Sep 2017 15:28:55 +0000 Subject: [PATCH] Fix type of bitstart in vectorizable_live_operation This patch changes the type of the multiplier applied by vectorizable_live_operation from unsigned_type_node to bitsizetype, which matches the type of TYPE_SIZE and is the type expected of a BIT_FIELD_REF bit position. This is shown by existing tests when SVE is added. 2017-09-18 Richard Sandiford Alan Hayward David Sherwood gcc/ * tree-vect-loop.c (vectorizable_live_operation): Fix type of bitstart. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@252931 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/tree-vect-loop.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c052cc55bc..9142af1bb06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,13 @@ Alan Hayward David Sherwood + * tree-vect-loop.c (vectorizable_live_operation): Fix type of + bitstart. + +2017-09-18 Richard Sandiford + Alan Hayward + David Sherwood + * tree-vect-loop.c (vectorizable_live_operation): Fix element size calculation for vector booleans. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 5d29ef5275c..3140bbbbfff 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -7091,7 +7091,7 @@ vectorizable_live_operation (gimple *stmt, vec_lhs = gimple_get_lhs (SLP_TREE_VEC_STMTS (slp_node)[vec_entry]); /* Get entry to use. */ - bitstart = build_int_cst (unsigned_type_node, vec_index); + bitstart = bitsize_int (vec_index); bitstart = int_const_binop (MULT_EXPR, bitsize, bitstart); } else -- 2.11.4.GIT