Summary: | Tree-ssa-pre can create loop carried dependencies which prevent loop vectorization. | ||
---|---|---|---|
Product: | gcc | Reporter: | Yuri Rumyantsev <ysrumyan> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | anlauf, izamyatin |
Priority: | P3 | ||
Version: | 4.8.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2013-03-11 00:00:00 | |
Bug Depends on: | |||
Bug Blocks: | 53947 | ||
Attachments: | testcase |
Description
Yuri Rumyantsev
2013-03-11 13:34:38 UTC
Created attachment 29636 [details]
testcase
This test must be compiled with the following options for x86:
-ffree-line-length-none -m64 -Ofast -march=core-avx-i -mavx
Confirmed (and known). See inhibit_phi_insertion in PRE. I bet you find some duplicate in the list of missed-vectorization bugs. Loop store-motion can result in similar issues. Note that an issue with limiting things even further is that PRE is limited even when the resulting loop is _not_ vectorized. Which is of course bad. So the best solution is to teach the vectorizer to handle this kind of dependency (after all user code can be written in that way from the start). |