public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "stammark at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/96974] [10/11 Regression] ICE in vect_get_vector_types_for_stmt compiling for SVE Date: Thu, 28 Jan 2021 11:47:06 +0000 [thread overview] Message-ID: <bug-96974-4-CC7eyyJxu6@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96974-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96974 --- Comment #8 from Stam Markianos-Wright <stammark at gcc dot gnu.org> --- I have a liiitle bit more progress here, but I have a question about vect_get_smallest_scalar_type. If we look at the comment before the function: >/* Return the smallest scalar part of STMT_INFO. > This is used to determine the vectype of the stmt. We generally set the > vectype according to the type of the result (lhs). For stmts whose > result-type is different than the type of the arguments (e.g., demotion, > promotion), vectype will be reset appropriately (later). Note that we have > to visit the smallest datatype in this function, because that determines the > VF. If the smallest datatype in the loop is present only as the rhs of a > promotion operation - we'd miss it. Would this be "smallest datatype in all cases", or is this more like "the smallest datatype within the same promotion/demotion chain"? i.e. how should we react if we detect a smallest datatype on the rhs of "float" when everything else in the stmt has been in the integer chain (int or, like in this case, long int)? > Such a case, where a variable of this datatype does not appear in the lhs > anywhere in the loop, can only occur if it's an invariant: e.g.: > 'int_x = (int) short_inv', which we'd expect to have been optimized away by > invariant motion. However, we cannot rely on invariant motion to always > take invariants out of the loop, and so in the case of promotion we also > have to check the rhs. > LHS_SIZE_UNIT and RHS_SIZE_UNIT contain the sizes of the corresponding > types. */ I have found that this is why we end up with a smaller number in: TYPE_VECTOR_SUBPARTS (nunits_vectype) == 4 than in: TYPE_VECTOR_SUBPARTS (*stmt_vectype_out) == 8 So I'm thinking that either A) We shouldn't allow this, and add in some check maybe for "GET_MODE_CLASS (x) == GET_MODE_CLASS (y)" or B) Some of the logic that generates stmt_vectype_out is deficient and it should also be detecting the existence of a "float" type to get the VF.
next prev parent reply other threads:[~2021-01-28 11:47 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-08 11:20 [Bug tree-optimization/96974] New: " ktkachov at gcc dot gnu.org 2020-09-08 11:21 ` [Bug tree-optimization/96974] " ktkachov at gcc dot gnu.org 2020-09-08 13:03 ` rguenth at gcc dot gnu.org 2020-10-15 15:36 ` stammark at gcc dot gnu.org 2021-01-05 10:09 ` ktkachov at gcc dot gnu.org 2021-01-18 10:29 ` stammark at gcc dot gnu.org 2021-01-18 10:38 ` rsandifo at gcc dot gnu.org 2021-01-18 13:32 ` stammark at gcc dot gnu.org 2021-01-18 13:48 ` rsandifo at gcc dot gnu.org 2021-01-18 13:52 ` stammark at gcc dot gnu.org 2021-01-28 11:47 ` stammark at gcc dot gnu.org [this message] 2021-01-28 11:47 ` stammark at gcc dot gnu.org 2021-01-28 11:59 ` rsandifo at gcc dot gnu.org 2021-01-28 13:12 ` rguenth at gcc dot gnu.org 2021-03-25 15:30 ` cvs-commit at gcc dot gnu.org 2021-03-25 15:32 ` cvs-commit at gcc dot gnu.org 2021-03-31 9:42 ` ktkachov at gcc dot gnu.org 2021-03-31 9:54 ` rguenth at gcc dot gnu.org 2021-03-31 13:57 ` cvs-commit at gcc dot gnu.org 2021-03-31 13:59 ` cvs-commit 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-96974-4-CC7eyyJxu6@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).