public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/107114] [13 Regression] Failure to discover range results in bogus warning
Date: Mon, 03 Oct 2022 15:46:05 +0000	[thread overview]
Message-ID: <bug-107114-4-35A00s8iGj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107114-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Andrew Macleod <amacleod at redhat dot com> ---
Looks like something in the change is causing the loop analysis to not be able
to count the iterations.


> Analyzing # of iterations of loop 1
>   exit condition [1, + , 1] != 0
>   bounds on difference of bases: -1 ... -1
>   result:
>     # of iterations 65535, bounded by 65535
109,110d68
<    Loops range found for a_lsm.14_26: [irange] short int [1, 9] NONZERO 0xf
and calculated range :[irange] short int VARYING
< Global Exported: a_lsm.14_26 = [irange] short int [1, 9] NONZERO 0xf
112,114c70,72
<    Loops range found for c_lsm.16_29: [irange] int [1, 2115902953] NONZERO
0x7fffffff and calculated range :[irange] int [-1618507910, +INF]
< Global Exported: c_lsm.16_29 = [irange] int [1, 2115902953] NONZERO
0x7fffffff
< Folding PHI node: a_lsm.14_26 = PHI <1(2), _11(12)>

before this change, loop analysis decided the range of _26 as
a_lsm.14_26: [irange] short int [1, 9] NONZERO 0xf a

afterwards, it doesn't even seem to see the loop.  IN fact, before LCSSA
creates a whole bunch of new blocks too.

< ;; Created LCSSA PHI: a_lsm.14_15 = PHI <a_lsm.14_26(8)>
< ;; Created LCSSA PHI: a_lsm_flag.15_16 = PHI <a_lsm_flag.15_28(8)>
< ;; Created LCSSA PHI: d_47 = PHI <d_13(7)>
< 
< Updating SSA:
< Registering new PHI nodes in block #13
< Updating SSA information for statement if (a_lsm.14_26 != 0)
< Registering new PHI nodes in block #6
< Registering new PHI nodes in block #12
< Updating SSA information for statement a.9_9 = (unsigned short) a_lsm.14_26;
< Registering new PHI nodes in block #16
< Registering new PHI nodes in block #7
< Registering new PHI nodes in block #8
< Updating SSA information for statement if (d_13 != 0B)
< Registering new PHI nodes in block #9
< Updating SSA information for statement if (a_lsm_flag.15_28 != 0)
< Registering new PHI nodes in block #10
< Updating SSA information for statement a = a_lsm.14_26;
< Registering new PHI nodes in block #11
< Registering new PHI nodes in block #19
< Registering new PHI nodes in block #15

  parent reply	other threads:[~2022-10-03 15:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01 17:59 [Bug tree-optimization/107114] New: " jeffreyalaw at gmail dot com
2022-10-01 18:01 ` [Bug tree-optimization/107114] " law at gcc dot gnu.org
2022-10-03 15:46 ` amacleod at redhat dot com [this message]
2022-10-03 17:37 ` law at gcc dot gnu.org
2022-10-03 18:18 ` amacleod at redhat dot com
2022-10-03 18:21 ` law at gcc dot gnu.org
2022-10-06  9:27 ` rguenth at gcc dot gnu.org
2022-12-22 14:32 ` rguenth at gcc dot gnu.org
2023-02-21 13:51 ` 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-107114-4-35A00s8iGj@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).