[Bug tree-optimization/26944] [4.1/4.2 Regression] -ftree-ch generates worse code
dann at godzilla dot ics dot uci dot edu
gcc-bugzilla@gcc.gnu.org
Thu Mar 30 16:43:00 GMT 2006
------- Comment #2 from dann at godzilla dot ics dot uci dot edu 2006-03-30 16:43 -------
(In reply to comment #1)
> Note that this may be also PRE confusing SCEV in presence of loop headers.
Talking about PRE, here's a maybe interesting observation in the PRE dump:
<L7>:;
pretmp.30_53 = Int_Loc.0_4 * 200;
pretmp.32_23 = (int[50] *) pretmp.30_53;
pretmp.32_11 = pretmp.32_23 + Arr_2_Par_Ref_30;
goto <bb 4> (<L2>);
<L6>:;
pretmp.27_59 = Int_Loc.0_4 * 200;
pretmp.28_45 = (int[50] *) pretmp.27_59;
pretmp.28_49 = Arr_2_Par_Ref_30 + pretmp.28_45;
# Int_Index_37 = PHI <Int_Index_58(7), Int_Loc_3(5)>;
<L0>:;
D.1544_54 = pretmp.27_59;
D.1545_55 = pretmp.28_45;
D.1546_56 = pretmp.28_49;
(*D.1546_56)[Int_Index_37] = Int_Loc_3;
Int_Index_58 = Int_Index_37 + 1;
if (D.1548_41 >= Int_Index_58) goto <L8>; else goto <L9>;
<L8>:;
goto <bb 3> (<L0>);
<L9>:;
# prephitmp.33_40 = PHI <D.1546_56(8), pretmp.32_11(6)>;
# prephitmp.33_18 = PHI <D.1545_55(8), pretmp.32_23(6)>;
# prephitmp.31_25 = PHI <D.1544_54(8), pretmp.30_53(6)>;
Compare pretmp.28_49 with pretmp.32_11, why are the arguments in a different
order? Is there something unstable in the PRE algorithm?
One has to wonder what are the tree-ch effects on more complex loops.
It might be interesting test SPEC with and without tree-ch...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26944
More information about the Gcc-bugs
mailing list