public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "irar at il dot ibm.com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [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 Date: Wed, 09 Nov 2011 17:52:00 -0000 [thread overview] Message-ID: <bug-51058-4-Bc2jr0h7cf@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51058-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51058 --- Comment #4 from Ira Rosen <irar at il dot ibm.com> 2011-11-09 17:40:26 UTC --- Thanks. Index: tree-vect-slp.c =================================================================== --- tree-vect-slp.c (revision 181190) +++ tree-vect-slp.c (working copy) @@ -2191,7 +2191,7 @@ 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 = gimple_expr_code (stmt); gimple def_stmt; struct loop *loop; @@ -2287,22 +2287,32 @@ 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 (op_num == 0 || op_num == 1) + switch (code) { - tree cond = gimple_assign_rhs1 (stmt); - op = TREE_OPERAND (cond, op_num); + 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); } - else - { - if (op_num == 2) - op = gimple_assign_rhs2 (stmt); - else - op = gimple_assign_rhs3 (stmt); - } } if (reduc_index != -1)
next prev parent reply other threads:[~2011-11-09 17:41 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-11-09 13:41 [Bug tree-optimization/51058] New: " dominiq at lps dot ens.fr 2011-11-09 14:46 ` [Bug tree-optimization/51058] " rguenth at gcc dot gnu.org 2011-11-09 17:18 ` irar at il dot ibm.com 2011-11-09 17:20 ` jakub at gcc dot gnu.org 2011-11-09 17:21 ` jakub at gcc dot gnu.org 2011-11-09 17:52 ` irar at il dot ibm.com [this message] 2011-11-09 18:33 ` dominiq at lps dot ens.fr 2011-11-10 9:53 ` rguenther at suse dot de 2011-11-10 10:28 ` irar at gcc dot gnu.org 2011-11-10 14:40 ` dominiq at lps dot ens.fr 2011-11-10 19:00 ` jakub at gcc dot gnu.org 2011-11-11 8:30 ` irar at il dot ibm.com 2011-11-11 9:51 ` irar at il dot ibm.com 2011-11-11 12:42 ` jakub at gcc dot gnu.org 2011-11-11 20:07 ` jakub at gcc dot gnu.org 2011-11-24 16:07 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-51058-4-Bc2jr0h7cf@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).