public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/101481] [11/12 Regression] -ftree-loop-distribute-patterns can slow down and increases size of code
Date: Sat, 17 Jul 2021 03:36:06 +0000	[thread overview]
Message-ID: <bug-101481-4-2LOHiykkK6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101481-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Keywords|                            |missed-optimization
   Target Milestone|---                         |11.2
   Last reconfirmed|                            |2021-07-17
            Summary|-ftree-loop-distribute-patt |[11/12 Regression]
                   |erns can slow down and      |-ftree-loop-distribute-patt
                   |increases size of code      |erns can slow down and
                   |                            |increases size of code
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.  The ranges should be figured out that the max size is 4.

In fact GCC knows the range really (note I think it is really [0,2] but that is
a different issue) and the loop bounds is max 4.

;;   basic block 6, loop depth 1, count 805306369 (estimated locally), maybe
hot
;;    prev block 8, next block 9, flags: (NEW, REACHABLE, VISITED)
;;    pred:       9 [always]  count:603979777 (estimated locally)
(FALLTHRU,DFS_BACK)
;;                8 [always]  count:201326592 (estimated locally) (FALLTHRU)
  # RANGE [-1, 2]
  # i_17 = PHI <i_16(9), i_11(8)>
  # .MEM_21 = PHI <.MEM_15(9), .MEM_9(D)(8)>
  # RANGE [1, 3] NONZERO 3
  _4 = i_17 + 1;
  # VUSE <.MEM_21>
  _5 = a_10(D)->chunksD.1943[i_17];
  # .MEM_15 = VDEF <.MEM_21>
  a_10(D)->chunksD.1943[_4] = _5;
  # RANGE [-1, 1]
  i_16 = i_17 + -1;
  if (i_16 >= _20)
    goto <bb 9>; [75.00%]
  else
    goto <bb 7>; [25.00%]
;;    succ:       9 [75.0% (guessed)]  count:603979777 (estimated locally)
(TRUE_VALUE,EXECUTABLE)
;;                7 [25.0% (guessed)]  count:201326592 (estimated locally)
(FALSE_VALUE,EXECUTABLE)

;;   basic block 9, loop depth 1, count 603979777 (estimated locally), maybe
hot
;;    prev block 6, next block 7, flags: (NEW)
;;    pred:       6 [75.0% (guessed)]  count:603979777 (estimated locally)
(TRUE_VALUE,EXECUTABLE)
  goto <bb 6>; [100.00%]
;;    succ:       6 [always]  count:603979777 (estimated locally)
(FALLTHRU,DFS_BACK)

  reply	other threads:[~2021-07-17  3:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17  2:59 [Bug tree-optimization/101481] New: " andres at anarazel dot de
2021-07-17  3:36 ` pinskia at gcc dot gnu.org [this message]
2021-07-17  3:37 ` [Bug tree-optimization/101481] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-07-19  6:29 ` rguenth at gcc dot gnu.org
2021-07-28  7:07 ` rguenth at gcc dot gnu.org
2022-04-21  7:49 ` rguenth at gcc dot gnu.org
2023-05-29 10:05 ` [Bug tree-optimization/101481] [11/12/13/14 " jakub 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-101481-4-2LOHiykkK6@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).