public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "luoxhu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/98914] [11 Regression] ICE in rs6000_expand_vector_set, at config/rs6000/rs6000.c:7198 Date: Wed, 03 Feb 2021 03:59:34 +0000 [thread overview] Message-ID: <bug-98914-4-A5DbAk6FX5@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98914-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98914 --- Comment #1 from luoxhu at gcc dot gnu.org --- The type of k in the case should be "long" to reproduce the issue, ICE happens at rs6000_expand_vector_set: gcc_assert (GET_MODE (idx) == E_SImode); Reason is the vector index variable need be "signed int" for all vec_insert prototype. ELFv2 ABI: vector signed char vec_insert (signed char, vector signed char, signed int); vector unsigned char vec_insert (unsigned char, vector unsigned char, signed int); vector signed int vec_insert (signed int, vector signed int, signed int); vector unsigned int vec_insert (unsigned int, vector unsigned int, signed int); vector signed long long vec_insert (signed long long, vector signed long long, signed int); Not sure all targets like X86/AArch64 also has some requirements, and whether below fix reasonable to not generate IFN VEC_SET for stmt like VIEW_CONVERT_EXPR<unsigned char[16]>(v)[k_7] = 170; ? diff --git a/gcc/gimple-isel.cc b/gcc/gimple-isel.cc index 2c78a08d3f1..dbbae270a36 100644 --- a/gcc/gimple-isel.cc +++ b/gcc/gimple-isel.cc @@ -77,6 +77,7 @@ gimple_expand_vec_set_expr (gimple_stmt_iterator *gsi) tree view_op0 = TREE_OPERAND (op0, 0); machine_mode outermode = TYPE_MODE (TREE_TYPE (view_op0)); if (auto_var_in_fn_p (view_op0, cfun->decl) + && TYPE_MODE (TREE_TYPE (pos)) == E_SImode && !TREE_ADDRESSABLE (view_op0) && can_vec_set_var_idx_p (outermode)) { location_t loc = gimple_location (stmt);
next prev parent reply other threads:[~2021-02-03 3:59 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-01 11:31 [Bug target/98914] New: " asolokha at gmx dot com 2021-02-02 8:12 ` [Bug target/98914] " rguenth at gcc dot gnu.org 2021-02-03 3:59 ` luoxhu at gcc dot gnu.org [this message] 2021-02-03 8:11 ` rguenth at gcc dot gnu.org 2021-02-03 8:15 ` jakub at gcc dot gnu.org 2021-02-04 0:38 ` luoxhu at gcc dot gnu.org 2021-03-22 2:15 ` cvs-commit at gcc dot gnu.org 2021-03-22 2:16 ` luoxhu 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-98914-4-A5DbAk6FX5@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).