public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105394] [12 Regression] ICE: verify_gimple failed with MVE during GIMPLE pass: veclower2 Date: Tue, 26 Apr 2022 13:22:36 +0000 [thread overview] Message-ID: <bug-105394-4-1fxaUp3Ttd@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105394-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105394 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|tree-optimization |target Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot gnu.org Status|ASSIGNED |NEW CC| |rguenth at gcc dot gnu.org, | |rsandifo at gcc dot gnu.org --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- I see for arm B4Imode as inner mode of V4BI but on aarch64 the VNxMBI modes all have BImode as inner mode. They'd of course still run into this issue if we ever have to lower SVE ops. But maybe that we run into this for MVE is also just because of missing patterns in the machine description. diff --git a/gcc/tree-vect-generic.cc b/gcc/tree-vect-generic.cc index 8b7227e8b58..1258cc48b16 100644 --- a/gcc/tree-vect-generic.cc +++ b/gcc/tree-vect-generic.cc @@ -1034,6 +1034,7 @@ expand_vector_condition (gimple_stmt_iterator *gsi, bitmap dce_ssa_names) tree a2 = NULL_TREE; bool a_is_comparison = false; bool a_is_scalar_bitmask = false; + unsigned bitmask_elwidth = 0; tree b = gimple_assign_rhs2 (stmt); tree c = gimple_assign_rhs3 (stmt); vec<constructor_elt, va_gc> *v; @@ -1111,14 +1112,12 @@ expand_vector_condition (gimple_stmt_iterator *gsi, bitmap dce_ssa_names) if (!a_is_comparison && VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (a)) - && SCALAR_INT_MODE_P (TYPE_MODE (TREE_TYPE (a))) - && known_lt (GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (a))), - TYPE_VECTOR_SUBPARTS (TREE_TYPE (a)) - * GET_MODE_BITSIZE (SCALAR_TYPE_MODE - (TREE_TYPE (TREE_TYPE (a)))))) + && (SCALAR_INT_MODE_P (TYPE_MODE (TREE_TYPE (a))) + || GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (a))) == MODE_VECTOR_BOOL)) { a_is_scalar_bitmask = true; - int prec = GET_MODE_PRECISION (SCALAR_TYPE_MODE (TREE_TYPE (a))); + bitmask_elwidth = TYPE_PRECISION (TREE_TYPE (TREE_TYPE (a))); + int prec = GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (a))).to_constant (); tree atype = build_nonstandard_integer_type (prec, 1); a = gimplify_build1 (gsi, VIEW_CONVERT_EXPR, atype, a); } @@ -1141,7 +1140,8 @@ expand_vector_condition (gimple_stmt_iterator *gsi, bitmap dce_ssa_names) } else if (a_is_scalar_bitmask) { - wide_int w = wi::set_bit_in_zero (i, TYPE_PRECISION (TREE_TYPE (a))); + wide_int w = wi::shifted_mask (i * bitmask_elwidth, bitmask_elwidth, + false, TYPE_PRECISION (TREE_TYPE (a))); result = gimplify_build2 (gsi, BIT_AND_EXPR, TREE_TYPE (a), a, wide_int_to_tree (TREE_TYPE (a), w)); aa = build2 (NE_EXPR, boolean_type_node, result,
next prev parent reply other threads:[~2022-04-26 13:22 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-26 12:23 [Bug tree-optimization/105394] New: " acoplan at gcc dot gnu.org 2022-04-26 12:40 ` [Bug tree-optimization/105394] " rguenth at gcc dot gnu.org 2022-04-26 12:42 ` acoplan at gcc dot gnu.org 2022-04-26 13:18 ` rguenth at gcc dot gnu.org 2022-04-26 13:19 ` rguenth at gcc dot gnu.org 2022-04-26 13:22 ` rguenth at gcc dot gnu.org [this message] 2022-04-29 9:07 ` [Bug target/105394] [12/13 " rguenth at gcc dot gnu.org 2022-04-29 9:20 ` rguenth at gcc dot gnu.org 2022-04-29 9:57 ` rguenth at gcc dot gnu.org 2022-04-29 9:59 ` acoplan at gcc dot gnu.org 2022-05-03 8:34 ` acoplan at gcc dot gnu.org 2022-05-03 8:49 ` rguenther at suse dot de 2022-05-03 9:19 ` cvs-commit at gcc dot gnu.org 2022-05-03 9:25 ` [Bug target/105394] [12 " rguenth at gcc dot gnu.org 2022-05-06 8:33 ` jakub at gcc dot gnu.org 2022-05-06 9:27 ` cvs-commit at gcc dot gnu.org 2022-05-06 9:28 ` rguenth 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-105394-4-1fxaUp3Ttd@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).