public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111276] New: rewrite_to_defined_overflow rewrites already defined code
@ 2023-09-03  2:52 pinskia at gcc dot gnu.org
  2023-09-03  2:52 ` [Bug tree-optimization/111276] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-03  2:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111276
           Summary: rewrite_to_defined_overflow rewrites already defined
                    code
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog, internal-improvement
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
int bcmp_2(char *a, char *b, unsigned s) {
    if (s < 16) {
        if (s >= 8)
                return 1;

    }
    return 0;
}
```
ifcombine produces:
```
rewriting stmt with undefined signed overflow _4 = s_2(D) + 4294967288;
  unsigned intD.9 s_2(D) = sD.3394;
...
  _5 = s_2(D) + 4294967288;
  _4 = (unsigned intD.9) _5;
  if (_4 <= 7)
```

Seems like we don't need to do a rewrite in this case ...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/111276] rewrite_to_defined_overflow rewrites already defined code
  2023-09-03  2:52 [Bug tree-optimization/111276] New: rewrite_to_defined_overflow rewrites already defined code pinskia at gcc dot gnu.org
@ 2023-09-03  2:52 ` pinskia at gcc dot gnu.org
  2023-09-03 16:19 ` pinskia at gcc dot gnu.org
  2023-09-12 10:49 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-03  2:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-09-03
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine for now.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/111276] rewrite_to_defined_overflow rewrites already defined code
  2023-09-03  2:52 [Bug tree-optimization/111276] New: rewrite_to_defined_overflow rewrites already defined code pinskia at gcc dot gnu.org
  2023-09-03  2:52 ` [Bug tree-optimization/111276] " pinskia at gcc dot gnu.org
@ 2023-09-03 16:19 ` pinskia at gcc dot gnu.org
  2023-09-12 10:49 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-03 16:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2023-Septemb
                   |                            |er/629171.html
           Keywords|                            |patch

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch posted:
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629171.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/111276] rewrite_to_defined_overflow rewrites already defined code
  2023-09-03  2:52 [Bug tree-optimization/111276] New: rewrite_to_defined_overflow rewrites already defined code pinskia at gcc dot gnu.org
  2023-09-03  2:52 ` [Bug tree-optimization/111276] " pinskia at gcc dot gnu.org
  2023-09-03 16:19 ` pinskia at gcc dot gnu.org
@ 2023-09-12 10:49 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-12 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think the API expects to be guarded to only be called on stmts that require
rewriting.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-12 10:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-03  2:52 [Bug tree-optimization/111276] New: rewrite_to_defined_overflow rewrites already defined code pinskia at gcc dot gnu.org
2023-09-03  2:52 ` [Bug tree-optimization/111276] " pinskia at gcc dot gnu.org
2023-09-03 16:19 ` pinskia at gcc dot gnu.org
2023-09-12 10:49 ` rguenth at gcc dot gnu.org

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).