public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111275] New: ifcombine and reassociation does not like to produce `a ^ b` sometimes
@ 2023-09-02 21:17 pinskia at gcc dot gnu.org
  2023-09-03  7:50 ` [Bug tree-optimization/111275] " pinskia at gcc dot gnu.org
  2023-09-03 21:50 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-02 21:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111275
           Summary: ifcombine and reassociation does not like to produce
                    `a ^ b` sometimes
           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 f0(_Bool u, _Bool v)
{
  _Bool t1, t;
  t = !u & v;
  t1 = !v & u;
  if (t) goto L40;
  if (t1) goto L40;
  return 0;
L40:
  return 1;
}
int f1(_Bool u, _Bool v)
{
  _Bool t1, t;
  t = !u & v;
  if (t) goto L40;
  t1 = !v & u;
  if (t1) goto L40;
  return 0;
L40:
  return 1;
}
```

These 2 should just produce `return u ^ v;` (or `return u != v;`) but currently
only f0 does.

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

* [Bug tree-optimization/111275] ifcombine and reassociation does not like to produce `a ^ b` sometimes
  2023-09-02 21:17 [Bug tree-optimization/111275] New: ifcombine and reassociation does not like to produce `a ^ b` sometimes pinskia at gcc dot gnu.org
@ 2023-09-03  7:50 ` pinskia at gcc dot gnu.org
  2023-09-03 21:50 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-03  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So I suspect this is basically the same issue as PR 67628.

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

* [Bug tree-optimization/111275] ifcombine and reassociation does not like to produce `a ^ b` sometimes
  2023-09-02 21:17 [Bug tree-optimization/111275] New: ifcombine and reassociation does not like to produce `a ^ b` sometimes pinskia at gcc dot gnu.org
  2023-09-03  7:50 ` [Bug tree-optimization/111275] " pinskia at gcc dot gnu.org
@ 2023-09-03 21:50 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-03 21:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |95034

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is basically PR 95034 .


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95034
[Bug 95034] Failure to convert xor pattern (made out of or+and) to xor

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

end of thread, other threads:[~2023-09-03 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-02 21:17 [Bug tree-optimization/111275] New: ifcombine and reassociation does not like to produce `a ^ b` sometimes pinskia at gcc dot gnu.org
2023-09-03  7:50 ` [Bug tree-optimization/111275] " pinskia at gcc dot gnu.org
2023-09-03 21:50 ` 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).