Commit 26a7fca2 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/52750 (32xsigned char __builtin_shuffle)

	PR middle-end/52750
	* tree-vect-generic.c (vector_element): Perform multiplication
	for pos in bitsizetype type instead of idx type.

	* gcc.c-torture/compile/pr52750.c: New test.

From-SVN: r185914
parent 7d776ee2
2012-03-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/52750
* tree-vect-generic.c (vector_element): Perform multiplication
for pos in bitsizetype type instead of idx type.
2012-03-28 Richard Guenther <rguenther@suse.de>
* loop-init.c (loop_optimizer_init): If loops are preserved
......
2012-03-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/52750
* gcc.c-torture/compile/pr52750.c: New test.
2012-03-28 Georg-Johann Lay <avr@gjlay.de>
PR target/52692
......
/* PR middle-end/52750 */
typedef signed char V __attribute__((vector_size (32)));
void
foo (V *x)
{
V m = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
*x = __builtin_shuffle (*x, m);
}
......@@ -567,8 +567,9 @@ vector_element (gimple_stmt_iterator *gsi, tree vect, tree idx, tree *ptmpvec)
else
{
tree size = TYPE_SIZE (vect_elt_type);
tree pos = fold_build2 (MULT_EXPR, TREE_TYPE (idx), idx, size);
return fold_build3 (BIT_FIELD_REF, vect_elt_type, vect, size, pos);
tree pos = fold_build2 (MULT_EXPR, bitsizetype, bitsize_int (index),
size);
return fold_build3 (BIT_FIELD_REF, vect_elt_type, vect, size, pos);
}
}
......
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