re PR tree-optimization/52686 (SLP crashes with WIDEN_LSHIFT_EXPR)

gcc/
	PR tree-optimization/52686
	* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Handle
	WIDEN_LSHIFT_EXPR.

	gcc/testsuite/
	PR tree-optimization/52686
	* gcc.target/arm/pr52686.c: New test.

From-SVN: r185795
This commit is contained in:
Ulrich Weigand 2012-03-26 13:13:07 +00:00 committed by Ulrich Weigand
parent 6b3936a2ba
commit 39f3fed69d
4 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2012-03-26 Ulrich Weigand <ulrich.weigand@linaro.org>
PR tree-optimization/52686
* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Handle
WIDEN_LSHIFT_EXPR.
2012-03-26 Tristan Gingold <gingold@adacore.com>
* config/alpha/vms.h (LINK_SPEC): Simplify.

View File

@ -1,3 +1,8 @@
2012-03-26 Ulrich Weigand <ulrich.weigand@linaro.org>
PR tree-optimization/52686
* gcc.target/arm/pr52686.c: New test.
2012-03-26 Georg-Johann Lay <avr@gjlay.de>
* gcc.target/avr/torture/avr-torture.exp (AVR_TORTURE_OPTIONS):

View File

@ -0,0 +1,19 @@
/* PR target/52375 */
/* { dg-do compile } */
/* { dg-require-effective-target arm_neon_ok } */
/* { dg-options "-march=armv7-a -mfloat-abi=softfp -mfpu=neon -O -ftree-vectorize" } */
unsigned int output[4];
void test (unsigned short *p)
{
unsigned int x = *p;
if (x)
{
output[0] = x << 1;
output[1] = x << 1;
output[2] = x << 1;
output[3] = x << 1;
}
}

View File

@ -111,6 +111,7 @@ vect_get_smallest_scalar_type (gimple stmt, HOST_WIDE_INT *lhs_size_unit,
if (is_gimple_assign (stmt)
&& (gimple_assign_cast_p (stmt)
|| gimple_assign_rhs_code (stmt) == WIDEN_MULT_EXPR
|| gimple_assign_rhs_code (stmt) == WIDEN_LSHIFT_EXPR
|| gimple_assign_rhs_code (stmt) == FLOAT_EXPR))
{
tree rhs_type = TREE_TYPE (gimple_assign_rhs1 (stmt));