Commit dbfa87aa by Yuri Rumyantsev Committed by Ilya Enkovich

tree-vect-stmts.c (vectorizable_shift): Add missed test on vect_induction_def.

gcc/

	* tree-vect-stmts.c (vectorizable_shift): Add missed test on
	vect_induction_def.

gcc/testsuite:

	* gcc.target/i386/avx2-vect-shift.c: New test.

From-SVN: r226781
parent b32bc1ac
2015-08-11 Yuri Rumyantsev <ysrumyan@gmail.com>
* tree-vect-stmts.c (vectorizable_shift): Add missed test on
vect_induction_def.
2015-08-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/66098
......
2015-08-11 Yuri Rumyantsev <ysrumyan@gmail.com>
* gcc.target/i386/avx2-vect-shift.c: New test.
2015-08-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/66098
......
/* { dg-do compile } */
/* { dg-require-effective-target avx2 } */
/* { dg-options "-mavx2 -O3 -fdump-tree-vect-details" } */
#define N 32
typedef unsigned int u32;
u32 a[N];
void foo()
{
int i;
for (i=0; i<N;i++)
a[i] = 1 << i;
}
/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -4461,7 +4461,9 @@ vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi,
/* Determine whether the shift amount is a vector, or scalar. If the
shift/rotate amount is a vector, use the vector/vector shift optabs. */
if (dt[1] == vect_internal_def && !slp_node)
if ((dt[1] == vect_internal_def
|| dt[1] == vect_induction_def)
&& !slp_node)
scalar_shift_arg = false;
else if (dt[1] == vect_constant_def
|| dt[1] == vect_external_def
......
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