Commit e009b055 by Richard Sandiford Committed by Richard Sandiford

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  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* tree-vect-loop.c (vectorizable_live_operation): Fix type of
	bitstart.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r252931
parent dd25e724
......@@ -2,6 +2,13 @@
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-loop.c (vectorizable_live_operation): Fix type of
bitstart.
2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-loop.c (vectorizable_live_operation): Fix element size
calculation for vector booleans.
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment