re PR tree-optimization/70726 (Internal compiler error (ICE) on valid code)
2016-04-20 Richard Biener <rguenther@suse.de> PR tree-optimization/70726 * tree-vect-stmts.c (vectorizable_shift): Do not use scalar shift amounts from a pattern stmt operand. * g++.dg/vect/pr70726.cc: New testcase. From-SVN: r235236
This commit is contained in:
parent
82c6f58aaf
commit
60d393e89c
4 changed files with 40 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-04-20 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/70726
|
||||
* tree-vect-stmts.c (vectorizable_shift): Do not use scalar
|
||||
shift amounts from a pattern stmt operand.
|
||||
|
||||
2016-04-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
|
||||
|
||||
PR target/70674
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2016-04-20 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/70726
|
||||
* g++.dg/vect/pr70726.cc: New testcase.
|
||||
|
||||
2016-04-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
|
||||
|
||||
PR target/70674
|
||||
|
|
19
gcc/testsuite/g++.dg/vect/pr70726.cc
Normal file
19
gcc/testsuite/g++.dg/vect/pr70726.cc
Normal file
|
@ -0,0 +1,19 @@
|
|||
// { dg-do compile }
|
||||
// { dg-additional-options "-Ofast" }
|
||||
// { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } }
|
||||
|
||||
extern long a;
|
||||
extern int b[100];
|
||||
extern unsigned c[5][5][2][4][2][2][3];
|
||||
void fn1() {
|
||||
for (int d = 0; d < 2; d = d + 1)
|
||||
for (int e = 0; e < 5; e = e + 1)
|
||||
for (int f = 0; f < 3; f = f + 1)
|
||||
for (int g = 0; g < 3; g = g + 1)
|
||||
for (int h = 0; h < 2; h = h + 1)
|
||||
for (int i = 0; i < 4; i = i + 1)
|
||||
for (int j = 0; j < 2; j = j + 1)
|
||||
for (int k = 0; k < 2; k = k + 1)
|
||||
for (int l = 0; l < 3; l = l + 1)
|
||||
c[d][e][h][i][j][k][l] = a << b[f * 5 + g] + 4;
|
||||
}
|
|
@ -4532,6 +4532,16 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
|
|||
if (!operand_equal_p (gimple_assign_rhs2 (slpstmt), op1, 0))
|
||||
scalar_shift_arg = false;
|
||||
}
|
||||
|
||||
/* If the shift amount is computed by a pattern stmt we cannot
|
||||
use the scalar amount directly thus give up and use a vector
|
||||
shift. */
|
||||
if (dt[1] == vect_internal_def)
|
||||
{
|
||||
gimple *def = SSA_NAME_DEF_STMT (op1);
|
||||
if (is_pattern_stmt_p (vinfo_for_stmt (def)))
|
||||
scalar_shift_arg = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue