re PR tree-optimization/51058 (ICE: gimple check: expected gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs_code, at gimple.h:1992)
PR tree-optimization/51058 * tree-vect-slp.c (vect_get_constant_vectors): Handle CALL_EXPR. From-SVN: r181251
This commit is contained in:
parent
78048b1c66
commit
bac430c92e
@ -1,3 +1,8 @@
|
||||
2011-11-10 Ira Rosen <ira.rosen@linaro.org>
|
||||
|
||||
PR tree-optimization/51058
|
||||
* tree-vect-slp.c (vect_get_constant_vectors): Handle CALL_EXPR.
|
||||
|
||||
2011-11-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/51000
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-11-10 Ira Rosen <ira.rosen@linaro.org>
|
||||
|
||||
PR tree-optimization/51058
|
||||
* gfortran.dg/vect/pr51058.f90: New test.
|
||||
|
||||
2011-11-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/51000
|
||||
|
19
gcc/testsuite/gfortran.dg/vect/pr51058.f90
Normal file
19
gcc/testsuite/gfortran.dg/vect/pr51058.f90
Normal file
@ -0,0 +1,19 @@
|
||||
! { dg-do compile }
|
||||
|
||||
SUBROUTINE MLIST(MOLsp,PBCx,PBCy,PBCz, X0)
|
||||
IMPLICIT NONE
|
||||
INTEGER, PARAMETER :: NM=16384
|
||||
INTEGER :: MOLsp, i
|
||||
REAL :: PBCx, PBCy, PBCz, boxjmp, HALf=1./2.
|
||||
REAL :: X0(2,-2:NM)
|
||||
|
||||
DO i = 1 , MOLsp
|
||||
boxjmp = PBCx*INT(X0(1,i)+SIGN(HALf,X0(1,i)))
|
||||
X0(1,i) = X0(1,i) - boxjmp
|
||||
boxjmp = PBCy*INT(X0(2,i)+SIGN(HALf,X0(2,i)))
|
||||
X0(2,i) = X0(2,i) - boxjmp
|
||||
ENDDO
|
||||
END
|
||||
|
||||
! { dg-final { cleanup-tree-dump "vect" } }
|
||||
|
@ -2191,7 +2191,7 @@ vect_get_constant_vectors (tree op, slp_tree slp_node,
|
||||
VEC (tree, heap) *voprnds = VEC_alloc (tree, heap, number_of_vectors);
|
||||
bool constant_p, is_store;
|
||||
tree neutral_op = NULL;
|
||||
enum tree_code code = gimple_assign_rhs_code (stmt);
|
||||
enum tree_code code = gimple_expr_code (stmt);
|
||||
gimple def_stmt;
|
||||
struct loop *loop;
|
||||
|
||||
@ -2287,21 +2287,31 @@ vect_get_constant_vectors (tree op, slp_tree slp_node,
|
||||
{
|
||||
if (is_store)
|
||||
op = gimple_assign_rhs1 (stmt);
|
||||
else if (gimple_assign_rhs_code (stmt) != COND_EXPR)
|
||||
op = gimple_op (stmt, op_num + 1);
|
||||
else
|
||||
else
|
||||
{
|
||||
if (op_num == 0 || op_num == 1)
|
||||
switch (code)
|
||||
{
|
||||
tree cond = gimple_assign_rhs1 (stmt);
|
||||
op = TREE_OPERAND (cond, op_num);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (op_num == 2)
|
||||
op = gimple_assign_rhs2 (stmt);
|
||||
else
|
||||
op = gimple_assign_rhs3 (stmt);
|
||||
case COND_EXPR:
|
||||
if (op_num == 0 || op_num == 1)
|
||||
{
|
||||
tree cond = gimple_assign_rhs1 (stmt);
|
||||
op = TREE_OPERAND (cond, op_num);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (op_num == 2)
|
||||
op = gimple_assign_rhs2 (stmt);
|
||||
else
|
||||
op = gimple_assign_rhs3 (stmt);
|
||||
}
|
||||
break;
|
||||
|
||||
case CALL_EXPR:
|
||||
op = gimple_call_arg (stmt, op_num);
|
||||
break;
|
||||
|
||||
default:
|
||||
op = gimple_op (stmt, op_num + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user