public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111348] New: `(a CMP b) ? minmax<a, c> : minmax<b, c>` pattern missing :c on CMP
@ 2023-09-08 21:59 pinskia at gcc dot gnu.org
  2023-09-08 22:00 ` [Bug tree-optimization/111348] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-08 21:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111348
           Summary: `(a CMP b) ? minmax<a, c> : minmax<b, c>` pattern
                    missing :c on CMP
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: internal-improvement, missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

```
(for minmax (min max)
 (for cmp (lt le gt ge ne)
  (simplify
   (cond (cmp @1 @3) (minmax:c @1 @4) (minmax:c @2 @4))
```

Is missing :c on cmp
because we could have
(@3 < @1) ? min(@1, @4) : min(@2, @4)

Which should match for and provide the same as `@1 > @3 ? min(@1, @4) : min(@2,
@4)`

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

end of thread, other threads:[~2023-09-11 20:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08 21:59 [Bug tree-optimization/111348] New: `(a CMP b) ? minmax<a, c> : minmax<b, c>` pattern missing :c on CMP pinskia at gcc dot gnu.org
2023-09-08 22:00 ` [Bug tree-optimization/111348] " pinskia at gcc dot gnu.org
2023-09-08 22:02 ` pinskia at gcc dot gnu.org
2023-09-11  0:23 ` pinskia at gcc dot gnu.org
2023-09-11 20:42 ` cvs-commit at gcc dot gnu.org
2023-09-11 20:42 ` 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).