[Bug tree-optimization/51058] [4.7 Regression] ICE: gimple check: expected gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs_code, at gimple.h:1992
irar at il dot ibm.com
gcc-bugzilla@gcc.gnu.org
Wed Nov 9 17:18:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51058
Ira Rosen <irar at il dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-11-09
CC| |irar at il dot ibm.com
AssignedTo|unassigned at gcc dot |irar at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Ira Rosen <irar at il dot ibm.com> 2011-11-09 17:06:38 UTC ---
I guess it'd better be
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
otherwise it's an interleaving group of 3, which is only supported on NEON,
AFAIK. I also changed the type to REAL to make it work (fail) on power.
This patch fixes the problem:
Index: tree-vect-slp.c
===================================================================
--- tree-vect-slp.c (revision 181190)
+++ tree-vect-slp.c (working copy)
@@ -2191,10 +2191,13 @@ vect_get_constant_vectors (tree op, slp_tree slp_n
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 = ERROR_MARK;
gimple def_stmt;
struct loop *loop;
+ if (is_gimple_assign (stmt))
+ code = gimple_assign_rhs_code (stmt);
+
if (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_reduction_def
&& reduc_index != -1)
{
@@ -2287,9 +2290,7 @@ vect_get_constant_vectors (tree op, slp_tree slp_n
{
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 (code == COND_EXPR)
{
if (op_num == 0 || op_num == 1)
{
@@ -2304,6 +2305,10 @@ vect_get_constant_vectors (tree op, slp_tree slp_n
op = gimple_assign_rhs3 (stmt);
}
}
+ else if (is_gimple_call (stmt))
+ op = gimple_op (stmt, op_num + 3);
+ else
+ op = gimple_op (stmt, op_num + 1);
if (reduc_index != -1)
{
I'll test it tomorrow.
(My GCC address is irar@gcc.gnu.org, and not ira@gcc.gnu.org).
More information about the Gcc-bugs
mailing list