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/107160] [13 regression] r13-2641-g0ee1548d96884d  causes verification failure in spec2006
Date: Thu, 13 Oct 2022 12:05:31 +0000	[thread overview]
Message-ID: <bug-107160-4-TxSh4BD3wA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107160-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
Aha, so the issue is that we have a vectorized epilogue here and the epilogue
of _that_ ends up doing


  <bb 11> [local count: 94607391]:
  # sum0_48 = PHI <sum0_28(3)>
  # sum1_47 = PHI <sum1_29(3)>
  # sum2_46 = PHI <sum2_30(3)>
  # sum3_45 = PHI <sum3_31(3)>
  # vect_sum3_31.16_101 = PHI <vect_sum3_31.16_97(3)>
  # vect_sum3_31.16_102 = PHI <vect_sum3_31.16_98(3)>
  # vect_sum3_31.16_103 = PHI <vect_sum3_31.16_99(3)>
  # vect_sum3_31.16_104 = PHI <vect_sum3_31.16_100(3)>
  _105 = BIT_FIELD_REF <vect_sum3_31.16_101, 32, 0>;
  _106 = BIT_FIELD_REF <vect_sum3_31.16_101, 32, 32>;
...
this is from the main vect

  <bb 17> [local count: 81467476]:
  # sum0_135 = PHI <sum0_62(12)>
  # sum1_136 = PHI <sum1_58(12)>
  # sum2_137 = PHI <sum2_54(12)>
  # sum3_138 = PHI <sum3_50(12)>
  # vect_sum3_50.25_159 = PHI <vect_sum3_50.25_158(12)>
this is from the epilogue

  <bb 15> [local count: 105119324]:
  # sum0_15 = PHI <sum0_135(17), _129(11)>
  # sum1_77 = PHI <sum1_136(17), _130(11)>
  # sum2_75 = PHI <sum2_137(17), _131(11)>
  # sum3_13 = PHI <sum3_138(17), _132(11)>
  # _160 = PHI <vect_sum3_50.25_159(17), vect_sum3_31.16_101(11)>
  _161 = BIT_FIELD_REF <_160, 32, 0>;
  _162 = BIT_FIELD_REF <_160, 32, 32>;
  _163 = BIT_FIELD_REF <_160, 32, 64>;
  _164 = BIT_FIELD_REF <_160, 32, 96>;
  _74 = _161 + _162;
  _76 = _74 + _163;
  _78 = _76 + _164;

so we fail to accumulate the main loops accumulators and just
use the first one.  On x86 the vectorized epilogue uses a smaller
vector size but the same number of accumulators.

It seems it's simply unexpected to have the unrolled SLP reduction
and a vectorized epilogue with the same vector mode (but not unrolled).

I can reproduce the failure when patching the x86 cost model to force
unrolling by 2 (maybe we want a --param to force that to aid debugging...).

  parent reply	other threads:[~2022-10-13 12:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 16:21 [Bug target/107160] New: " seurer at gcc dot gnu.org
2022-10-06 10:43 ` [Bug target/107160] " rguenth at gcc dot gnu.org
2022-10-06 14:04 ` seurer at gcc dot gnu.org
2022-10-06 19:08 ` seurer at gcc dot gnu.org
2022-10-10  2:29 ` linkw at gcc dot gnu.org
2022-10-10 19:14 ` seurer at gcc dot gnu.org
2022-10-12  8:31 ` linkw at gcc dot gnu.org
2022-10-13  9:57 ` linkw at gcc dot gnu.org
2022-10-13 10:16 ` rguenth at gcc dot gnu.org
2022-10-13 10:31 ` linkw at gcc dot gnu.org
2022-10-13 11:05 ` rguenther at suse dot de
2022-10-13 11:45 ` linkw at gcc dot gnu.org
2022-10-13 11:50 ` rguenther at suse dot de
2022-10-13 12:01 ` marxin at gcc dot gnu.org
2022-10-13 12:05 ` rguenth at gcc dot gnu.org [this message]
2022-10-13 12:23 ` rguenth at gcc dot gnu.org
2022-10-13 13:17 ` cvs-commit at gcc dot gnu.org
2022-10-13 13:19 ` [Bug target/107160] [12/13 " rguenth at gcc dot gnu.org
2022-10-14  2:54 ` [Bug target/107160] [12 " linkw at gcc dot gnu.org
2022-10-17 13:10 ` cvs-commit at gcc dot gnu.org
2022-10-17 13:11 ` 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-107160-4-TxSh4BD3wA@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).