This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2007 15:39:53 -0000
- Subject: [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
- References: <bug-32533-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from ubizjak at gmail dot com 2007-06-30 15:39 -------
Hm, in the dump (gcc-4.1.3), preceeding ifcvt, we have:
<L4>:;
D.985_28 = iftmp.5_4 + D.964_27;
M.2_29 = (int4) D.985_28;
if (M.2_29 > 1) goto <L7>; else goto <L9>;
<L7>:;
if (M.2_29 > 20) goto <L10>; else goto <L9>;
# M.2_61 = PHI <M.2_29(4), 1(3)>; <<<<<<---- here
<L9>:;
pretmp.98_1 = (real8) M.2_61;
# prephitmp.99_39 = PHI <2.0e+1(4), pretmp.98_1(5)>;
# M.2_3 = PHI <20(4), M.2_61(5)>;
<L10>:;
Isn't marked statement unreachable?
Comparing _.ssa dumps between 4.1 (wrong result) and 4.3 (correct result), we
have:
(4.1)
--cut here--
<L5>:;
M.1_36 = D.966_29;
goto <bb 8> (<L7>);
<L6>:;
M.1_35 = 1;
# M.1_2 = PHI <M.1_36(6), M.1_35(7)>; <<<< here (4.1)
<L7>:;
if (M.1_2 > 20) goto <L8>; else goto <L9>;
<L8>:;
M.2_34 = 20;
goto <bb 11> (<L10>);
--cut here--
versus
(4.3)
--cut here--
<bb 8>:
M.1_17 = D.1365_16;
goto <bb 10>;
<bb 9>:
M.1_18 = 1;
<bb 10>:
# M.1_1 = PHI <M.1_17(8), M.1_18(9)> <<<< here (4.3)
if (20 < M.1_1)
goto <bb 11>;
else
goto <bb 12>;
<bb 11>:
M.2_19 = 20;
goto <bb 13>;
---cut here---
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533