Summary: | Loop distribution fails to distribute | ||
---|---|---|---|
Product: | gcc | Reporter: | Ira Rosen <irar> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | changpeng.fang, gaoyunzhong, gcc-bugs, spop |
Priority: | P3 | Keywords: | missed-optimization |
Version: | 4.4.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2021-12-27 00:00:00 | |
Bug Depends on: | |||
Bug Blocks: | 53947 |
Description
Ira Rosen
2008-02-21 06:41:31 UTC
On trunk we would distribute a variant with a[i] = c[i] ... if the partitions would not be fused because of having similar memory accesses. With the reduction in place we only form a single useful partition because of the dependences. Thus, confirmed (we can build the RDG now), for _5 = a[i_19]; _6 = c[i_19]; _7 = d[i_19]; _8 = _6 * _7; _9 = _5 + _8; a[i_19] = _9; _11 = _7 + _9; _12 = i_19 + -1; _13 = b[_12]; _14 = _11 + _13; b[i_19] = _14; we'd have to use a[i_19] in the loop storing to b but instead we only try re-compute it via retaining _5 = a[i_19]; _6 = c[i_19]; _7 = d[i_19]; _8 = _6 * _7; _9 = _5 + _8; which of course does not work (a[i_19] is not available). |