public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110009] New: Another missing ABS detection
@ 2023-05-28  0:18 pinskia at gcc dot gnu.org
  2023-05-28  9:36 ` [Bug tree-optimization/110009] " gjl at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-28  0:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110009
           Summary: Another missing ABS detection
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
            Blocks: 109907
  Target Milestone: ---

Take:
```
unsigned
f1 (int v)
{
  unsigned int d_6;
  int b_5;
  unsigned int v1_2;
  unsigned int _7;
  int _9;

  b_5 = v>>(sizeof(v)*8 - 1);
  _9 = b_5 | 1;
  d_6 = (unsigned int) _9;
  v1_2 = (unsigned int) v;
  _7 = v1_2 * d_6;
  return _7;
}
```
This currently does not get converted to `return ABSU<v>`.

I found this while implementing a different match pattern and found that the
testcase pr103245-1.c was failing.

This blocks PR 109907 because the patch which is to fix a regression from the
patch of bug 109907 comment #25 introduces this.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109907
[Bug 109907] Missed optimization for bit extraction (uses shift instead of
single bit-test)

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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-28  0:18 [Bug tree-optimization/110009] New: Another missing ABS detection pinskia at gcc dot gnu.org
2023-05-28  9:36 ` [Bug tree-optimization/110009] " gjl at gcc dot gnu.org
2023-05-28 14:38 ` pinskia at gcc dot gnu.org
2023-07-12  6:26 ` pinskia at gcc dot gnu.org
2023-09-04  8:20 ` pinskia at gcc dot gnu.org
2023-09-04  8:39 ` pinskia at gcc dot gnu.org
2023-09-04  9:00 ` pinskia at gcc dot gnu.org
2023-09-04 18:09 ` pinskia at gcc dot gnu.org
2023-09-04 18:10 ` pinskia 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).