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 tree-optimization/110451] New: LIM fails to hoist comparisons
Date: Wed, 28 Jun 2023 11:00:52 +0000	[thread overview]
Message-ID: <bug-110451-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 110451
           Summary: LIM fails to hoist comparisons
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

For SPEC bwaves or gfortran.dg/pr81303.f we interchange the loop nest which
produces a conditional in the innermost loop like the following to handle
a reduction with invariant initialization:

  <bb 14> [local count: 955630226]:
  # l_93 = PHI <l_94(21), 1(13)>
  # ivtmp_58 = PHI <ivtmp_84(21), _85(13)>
  _30 = (integer(kind=8)) l_93;
  _31 = _29 + _30;
  y__I_lsm.120_22 = (*y_139(D))[_31];
  _23 = m_95 != 1;
  y__I_lsm.120_33 = _23 ? y__I_lsm.120_22 : 0.0;
  _42 = _30 + _41;
  _43 = (*a_141(D))[_42];

currently the LIM cost modeling finds it not profitable to hoist the
invariant m_95 != 1 compare.  This causes vectorization to choose
a larger vectorization factor to accomodate vectorizing this compare.

             reply	other threads:[~2023-06-28 11:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 11:00 rguenth at gcc dot gnu.org [this message]
2023-06-28 11:01 ` [Bug tree-optimization/110451] " rguenth at gcc dot gnu.org
2023-06-28 13:05 ` cvs-commit at gcc dot gnu.org
2023-06-28 13:09 ` 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-110451-4@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).