public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/110776] [14 Regression] powerpc-darwin bootstrap broken after r14-2490 with ICE rs6000.cc:5069 building libgfortran
Date: Tue, 25 Jul 2023 06:34:00 +0000 [thread overview]
Message-ID: <bug-110776-4-jAV6dWLZ3V@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110776-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110776
--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 25 Jul 2023, linkw at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110776
>
> Kewen Lin <linkw at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |rguenth at gcc dot gnu.org
>
> --- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
> The failure exposed one special case: there is one stmt
>
> # VUSE <.MEM_404>
> _15 = *_14;
>
> its STMT_VINFO_STRIDED_P (stmt_info) is set, memory_access_type is
> VMAT_ELEMENTWISE and alignment_support_scheme is dr_unaligned_supported, its
> vector type is "vector(1) long int", so in the handling it's taken as:
>
> /* Load vector(1) scalar_type if it's 1 element-wise vectype. */
> else if (nloads == 1)
> ltype = vectype;
>
> as its ltype is vector type, we cost it with
>
> if (VECTOR_TYPE_P (ltype))
> vect_get_load_cost (vinfo, stmt_info, 1,
> alignment_support_scheme, misalignment,
> false, &inside_cost, nullptr, cost_vec,
> cost_vec, true);
>
> as it's dr_unaligned_supported, it's costed as unaligned_load then causes the
> ICE. One idea is to teach rs6000_builtin_vectorization_cost about one single
> lane vector unaligned load as scalar_load. But I think it's simple to treat
> single lane vector load as scalar_load, as I expect veclower will lower it
> later.
>
> diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
> index 4622d6a04ef..bdf4c12cd03 100644
> --- a/gcc/tree-vect-stmts.cc
> +++ b/gcc/tree-vect-stmts.cc
> @@ -9985,7 +9985,9 @@ vectorizable_load (vec_info *vinfo,
> {
> if (costing_p)
> {
> - if (VECTOR_TYPE_P (ltype))
> + /* For a single lane vector type, we should cost it as
> + scalar_load to avoid ICE, see PR110776. */
> + if (VECTOR_TYPE_P (ltype) && lnel > 1)
> vect_get_load_cost (vinfo, stmt_info, 1,
> alignment_support_scheme,
> misalignment,
> false, &inside_cost, nullptr,
> cost_vec,
>
> Hi Richi, what do you think of this?
I think apart from the consideration what a single element vector
is compared to a scalar, a more to-the-point fix is
if (VECTOR_TYPE_P (ltype)
&& memory_access_type != VMAT_ELEMENTWISE)
next prev parent reply other threads:[~2023-07-25 6:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 15:45 [Bug target/110776] New: " iains at gcc dot gnu.org
2023-07-22 15:48 ` [Bug target/110776] " iains at gcc dot gnu.org
2023-07-22 16:07 ` pinskia at gcc dot gnu.org
2023-07-24 1:49 ` linkw at gcc dot gnu.org
2023-07-25 2:52 ` linkw at gcc dot gnu.org
2023-07-25 2:54 ` linkw at gcc dot gnu.org
2023-07-25 6:34 ` rguenther at suse dot de [this message]
2023-07-25 6:53 ` linkw at gcc dot gnu.org
2023-07-25 11:05 ` rguenther at suse dot de
2023-07-25 19:44 ` iains at gcc dot gnu.org
2023-07-26 2:54 ` linkw at gcc dot gnu.org
2023-07-27 2:43 ` cvs-commit at gcc dot gnu.org
2023-07-27 2:45 ` linkw 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-110776-4-jAV6dWLZ3V@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: link
Be 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).