public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110965] New: missing combining if ranges due to cast differences
@ 2023-08-10  6:17 pinskia at gcc dot gnu.org
  2023-08-10  6:18 ` [Bug tree-optimization/110965] " pinskia at gcc dot gnu.org
  2023-08-10  7:02 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-10  6:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110965
           Summary: missing combining if ranges due to cast differences
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
int f(long long l)
{
  int t =  (int)l;
  if (t == 1 || t == 2)
    return true;
  if (t == 3)
    return true;

  return false;
}

int f1(long long l)
{
  unsigned t =  (unsigned)l;
  if (t == 1 || t == 2)
    return true;
  if (t == 3)
    return true;
  return false;
}
```

f and f1 should produce the same code but currently does not.

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

end of thread, other threads:[~2023-08-10  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10  6:17 [Bug tree-optimization/110965] New: missing combining if ranges due to cast differences pinskia at gcc dot gnu.org
2023-08-10  6:18 ` [Bug tree-optimization/110965] " pinskia at gcc dot gnu.org
2023-08-10  7:02 ` 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).