[Bug tree-optimization/18694] [4.0 regression] loop miscompilation at -O1 (-ftree-ch)
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-09 01:46 -------
(In reply to comment #16)
> Here is a complete testcase that fails at DOM1.
> With -O0, this testcase prints "5 5 5".
> With -O1, this testcase prints "5 5 0".
>
> I generated this testcase from final_cleanup after disabling DOM[123].
Lets look at the SSA level for this:
L23:;
tmp_15 = d_5;
d_16 = d23_2;
# ivtmp14_6 = PHI <ivtmp14_13(1), ivtmp14_14(5)>;
# d_5 = PHI <d_12(1), d_16(5)>;
# tmp_4 = PHI <tmp_11(1), tmp_15(5)>;
# d23_3 = PHI <d23_9(1), d23_2(5)>;
L2:;
if (tmp_4 < d_5) goto L22; else goto L4;
See we know that this if condition cannot be proven false or true but DOM thinks is false always coming
from BB 5 (aka L23).
[20:45] < kazu> if you are coming from bb 1, the condition is ultimately tmp_11 < d_12. From bb 5,
the condition is ultimately tmp_15 < d_16.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18694
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply to: