public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111149] New: bool0 != bool1 should be convert into bool0 ^ bool1
@ 2023-08-25  2:09 pinskia at gcc dot gnu.org
  2023-08-25  2:09 ` [Bug tree-optimization/111149] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-25  2:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111149
           Summary: bool0 != bool1 should be convert into bool0 ^ bool1
           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:
```
_Bool k(_Bool a, _Bool b)
{
  return a != b;
}
```
This should be changed into:
```
_Bool k0(_Bool a, _Bool b)
{
  return a ^ b;
}
```

Note clange handles this.

The main problem with this is with respect to having it inside GIMPLE_COND ...

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

end of thread, other threads:[~2023-08-30  6:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25  2:09 [Bug tree-optimization/111149] New: bool0 != bool1 should be convert into bool0 ^ bool1 pinskia at gcc dot gnu.org
2023-08-25  2:09 ` [Bug tree-optimization/111149] " pinskia at gcc dot gnu.org
2023-08-25  2:21 ` [Bug middle-end/111149] bool0 != bool1 should be expanded as " pinskia at gcc dot gnu.org
2023-08-29  4:24 ` [Bug tree-optimization/111149] " pinskia at gcc dot gnu.org
2023-08-29 17:14 ` pinskia at gcc dot gnu.org
2023-08-29 17:23 ` pinskia at gcc dot gnu.org
2023-08-30  0:15 ` pinskia at gcc dot gnu.org
2023-08-30  5:07 ` pinskia at gcc dot gnu.org
2023-08-30  5:13 ` pinskia at gcc dot gnu.org
2023-08-30  6:11 ` 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).