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/99807] [11 Regression] ICE in vect_slp_analyze_node_operations_1, at tree-vect-slp.c:3727
Date: Mon, 29 Mar 2021 08:35:13 +0000	[thread overview]
Message-ID: <bug-99807-4-skD0LdtkLD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99807-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99807

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> Just to say we currently require a ("random") SLP_TREE_REPRESENTATIVE even on
> VEC_PERM_EXPR SLP nodes.  With the testcase the choosen one is no longer
> explicitely referenced and thus it does not get marked by SLP.  Note this
> will
> also cause it to turn hybrid - so it's probably one of the cases where the
> SLP marking as patterns "helped".

We can fix the ICE by delaying the assert but the other issue still shows
in costing (which also only walks participating stmts):

t.f90:5:30: note: Cost model analysis:
0x35e56c0 _25 1 times scalar_store costs 1 in body
0x35e56c0 _26 1 times scalar_store costs 1 in body
0x35e56c0 _11 + _23 1 times scalar_stmt costs 1 in body
0x35e56c0 _12 + _24 1 times scalar_stmt costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[0]> 1 times scalar_load costs 1 in body
0x35e56c0 IMAGPART_EXPR <(*z_8(D))[0]> 1 times scalar_load costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[1]> 1 times scalar_load costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[0]> 1 times unaligned_load (misalign -1)
costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[0]> 1 times vec_perm costs 2 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[1]> 1 times unaligned_load (misalign -1)
costs 1 in body
0x35e56c0 <unknown> 1 times vec_perm costs 2 in body
0x35e56c0 <unknown> 1 times vec_construct costs 2 in prologue
0x35e56c0 .COMPLEX_FMA (_25, _25, _25) 1 times vector_stmt costs 1 in body
0x35e56c0 <unknown> 1 times vec_construct costs 2 in prologue
0x35e56c0 _25 1 times unaligned_store (misalign -1) costs 1 in body
0x35e56c0 REALPART_EXPR <(*z_8(D))[1]> 1 times vec_to_scalar costs 2 in
epilogue
0x35e56c0 REALPART_EXPR <(*z_8(D))[1]> 1 times vec_to_scalar costs 2 in
epilogue
t.f90:5:30: note: Cost model analysis for part in loop 0:
  Vector cost: 16
  Scalar cost: 7
t.f90:5:30: missed: not vectorized: vectorization is not profitable.

so we're not costing all the scalar stmts covered by the .COMPLEX_FMA
expression
because scalar costing only looks at SLP_TREE_SCALAR_STMTS (it would not
cost multiple stmts covering a scalar pattern either).

That said, I'm going to fix this simple to deal with ICE now, all the rest
needs more thoughts (and I'd like to defer any solution to GCC 12 for the
moment).

  parent reply	other threads:[~2021-03-29  8:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29  5:09 [Bug target/99807] New: " asolokha at gmx dot com
2021-03-29  7:34 ` [Bug target/99807] " ktkachov at gcc dot gnu.org
2021-03-29  7:55 ` [Bug target/99807] [11 Regression] " rguenth at gcc dot gnu.org
2021-03-29  8:15 ` rguenth at gcc dot gnu.org
2021-03-29  8:35 ` rguenth at gcc dot gnu.org [this message]
2021-03-29 11:13 ` cvs-commit at gcc dot gnu.org
2021-03-29 11:13 ` 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-99807-4-skD0LdtkLD@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).