Bug 82426 - Missed tree-slp-vectorization on -O2 and -O3
Summary: Missed tree-slp-vectorization on -O2 and -O3
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 7.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks: vectorizer
  Show dependency treegraph
 
Reported: 2017-10-04 10:24 UTC by Allan Jensen
Modified: 2017-10-04 14:27 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
vectslp.cpp (177 bytes, text/plain)
2017-10-04 10:24 UTC, Allan Jensen
Details
Assembler output with -O3 (421 bytes, text/plain)
2017-10-04 10:25 UTC, Allan Jensen
Details
Assembler output with -Os -ftree-slp-vectorize (381 bytes, text/plain)
2017-10-04 10:25 UTC, Allan Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Jensen 2017-10-04 10:24:33 UTC
Created attachment 42299 [details]
vectslp.cpp

The attached example is a simple matrix multiplication. With -O3 or -O2 -ftree-slp-vectorize the basic-block is not vectorized.

Oddly, with -Os -ftree-slp-vectorize it is.
Comment 1 Allan Jensen 2017-10-04 10:25:13 UTC
Created attachment 42300 [details]
Assembler output with -O3
Comment 2 Allan Jensen 2017-10-04 10:25:36 UTC
Created attachment 42301 [details]
Assembler output with -Os -ftree-slp-vectorize
Comment 3 Allan Jensen 2017-10-04 10:33:07 UTC
Note it appears the fact it can do it at all in -Os is new in gcc 7