public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/111732] New: genmatch missed optimization
@ 2023-10-09  9:05 rguenth at gcc dot gnu.org
  2023-10-09 12:24 ` [Bug middle-end/111732] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-09  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111732
           Summary: genmatch missed optimization
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

For

(for coss (BUILT_IN_COS BUILT_IN_COSF BUILT_IN_COSL)
 (for sins (BUILT_IN_SIN BUILT_IN_SINF BUILT_IN_SINL)
  (simplify
   (abs (sins (coss @0)))
   @0)))

the cross product could be code generated more efficiently when we'd delay
for substitution but we don't, because it's only implemented for (match ...)
and not (simplify ...).

Specifically handling ordering correctly is tricky (match is unordered).
My original idea was to delay for lowering to decision tree insertion time
(split upon a "conflict" with another pattern).

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

* [Bug middle-end/111732] genmatch missed optimization
  2023-10-09  9:05 [Bug middle-end/111732] New: genmatch missed optimization rguenth at gcc dot gnu.org
@ 2023-10-09 12:24 ` rguenth at gcc dot gnu.org
  2023-10-09 12:26 ` rguenth at gcc dot gnu.org
  2023-10-10 17:49 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-09 12:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 56079
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56079&action=edit
start of a patch

Start of a patch.  Still has duplicate case values (dt tree insertion) and
missed for ID passing to the tail functions.

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

* [Bug middle-end/111732] genmatch missed optimization
  2023-10-09  9:05 [Bug middle-end/111732] New: genmatch missed optimization rguenth at gcc dot gnu.org
  2023-10-09 12:24 ` [Bug middle-end/111732] " rguenth at gcc dot gnu.org
@ 2023-10-09 12:26 ` rguenth at gcc dot gnu.org
  2023-10-10 17:49 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-09 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Created attachment 56079 [details]
> start of a patch
> 
> Start of a patch.  Still has duplicate case values (dt tree insertion) and
> missed for ID passing to the tail functions.

Overall effect isn't too big - the biggest limitation is likely failure to
factor outermost fors (or rather giving up on any delaying when the outermost
match expression needs to be for-lowered rather than deciding on an operator
basis).

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

* [Bug middle-end/111732] genmatch missed optimization
  2023-10-09  9:05 [Bug middle-end/111732] New: genmatch missed optimization rguenth at gcc dot gnu.org
  2023-10-09 12:24 ` [Bug middle-end/111732] " rguenth at gcc dot gnu.org
  2023-10-09 12:26 ` rguenth at gcc dot gnu.org
@ 2023-10-10 17:49 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-10 17:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |internal-improvement
   Last reconfirmed|                            |2023-10-10
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Severity|normal                      |enhancement

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

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

end of thread, other threads:[~2023-10-10 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-09  9:05 [Bug middle-end/111732] New: genmatch missed optimization rguenth at gcc dot gnu.org
2023-10-09 12:24 ` [Bug middle-end/111732] " rguenth at gcc dot gnu.org
2023-10-09 12:26 ` rguenth at gcc dot gnu.org
2023-10-10 17:49 ` 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).