Summary: | Expression reassociation problem | ||
---|---|---|---|
Product: | gcc | Reporter: | davidxl <xinliangli> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | gcc-bugs, yinyuefengyi |
Priority: | P3 | Keywords: | missed-optimization |
Version: | unknown | ||
Target Milestone: | --- | ||
See Also: |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88842 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111560 |
||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2008-02-22 10:55:53 |
Description
davidxl
2008-02-22 06:36:00 UTC
Confirmed. Re-association generates D.1548_3 = a1_4(D) + a1_4(D); b1_5 = D.1548_3 + a2_2(D); b2_6 = b1_5 + a2_2(D); D.1549_7 = b2_6 + a3_1(D); but that does not expose SSA_NAMEs with the same value. LLVM got it right: addl %esi, %edi leal (%rdx,%rdi,2), %eax vs gcc: addl %esi, %edx leal (%rsi,%rdi,2), %edi leal (%rdi,%rdx), %eax vs open64: leal 0(%rdi,%rsi,1), %eax # [0] addl %esi,%edx # [0] addl %edx,%edi # [1] addl %edi,%eax # [2] David If we use -fwrapv, then GCC is able to get it. THere might be a dup of this bug already too. |