public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/114435] New: Bad code generated when SSA and PCOM are enabled.
@ 2024-03-22 17:17 jchrist at linux dot ibm.com
  2024-03-25  8:52 ` [Bug tree-optimization/114435] PCOM messes up vectorization some times rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jchrist at linux dot ibm.com @ 2024-03-22 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114435
           Summary: Bad code generated when SSA and PCOM are enabled.
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jchrist at linux dot ibm.com
  Target Milestone: ---

Created attachment 57783
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57783&action=edit
Reproducer

While investigating a preformance difference between clang and gcc on
imagemagick I discovered that attached test case gets badly vectorized due to
pcom pass.  If I disable pcom and set the vector cost model to unlimited, SLP
produces exactly what I would expect.  With pcom, however, the code becomes
considerably bigger and, depending on the target, even mixes scalar and
vectorized operations while the whole body of the loop should be vectorizable
via SLP.

Difference is observed between the output of

```
gcc -O3 -fvect-cost-model=unlimited fma.c -c
```
and
```
gcc -O3 -fvect-cost-model=unlimited fma.c -c -fdisable-tree-pcom
```

I am wondering if the pcom pass should be after SLP vectorization?

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

end of thread, other threads:[~2024-05-29 11:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 17:17 [Bug tree-optimization/114435] New: Bad code generated when SSA and PCOM are enabled jchrist at linux dot ibm.com
2024-03-25  8:52 ` [Bug tree-optimization/114435] PCOM messes up vectorization some times rguenth at gcc dot gnu.org
2024-05-29  8:03 ` jchrist at linux dot ibm.com
2024-05-29  8:23 ` rguenth at gcc dot gnu.org
2024-05-29  8:34 ` rguenth at gcc dot gnu.org
2024-05-29  9:25 ` jchrist at linux dot ibm.com
2024-05-29 10:43 ` rguenth at gcc dot gnu.org
2024-05-29 10:55 ` rguenth at gcc dot gnu.org
2024-05-29 10:58 ` cvs-commit at gcc dot gnu.org
2024-05-29 11:07 ` rguenth at gcc dot gnu.org
2024-05-29 11:10 ` rguenth 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).