[Bug tree-optimization/25623] New: DOM messes up "incoming frequencies" for some BBs
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Jan 1 17:37:00 GMT 2006
Testcase:
SUBROUTINE S42(a,b,c,N)
IMPLICIT NONE
integer :: N
real*8 :: a(N),b(N),c(N),tmp,tmp2,tmp4
real*8, parameter :: p=1.0D0/3.0D0
integer :: i
c=0.0D0
DO i=1,N
tmp=a(i)**p ! could even be done with a cube root
tmp2=tmp*tmp
tmp4=tmp2*tmp2
b(i)=b(i)+tmp4
c(i)=c(i)+tmp2
ENDDO
END SUBROUTINE
------------
in .t50.dom2:
<bb 2>:
D.824_4 = *n_3;
if (D.824_4 <= 0) goto <L16>; else goto <L1>;
# S.7_5 = PHI <S.7_32(3), 1(2)>;
<L1>:;
D.826_31 = S.7_5 + -1;
(*c_26)[D.826_31] = 0.0;
S.7_32 = S.7_5 + 1;
if (D.824_4 < S.7_32) goto L.4; else goto <L1>;
Invalid sum of incoming frequencies 900, should be 0
L.4:;
Invalid sum of incoming frequencies 0, should be 766
# i_11 = PHI <1(4)>;
<L3>:;
# i_1 = PHI <1(5), i_30(6)>;
<L11>:;
D.828_13 = i_1 + -1;
D.820_15 = (*a_14)[D.828_13];
tmp_16 = __builtin_pow (D.820_15,
3.33333333333333314829616256247390992939472198486e-1);
tmp2_17 = __builtin_pow (tmp_16, 2.0e+0);
tmp4_18 = __builtin_pow (tmp2_17, 2.0e+0);
D.829_22 = (*b_21)[D.828_13];
D.830_23 = D.829_22 + tmp4_18;
(*b_21)[D.828_13] = D.830_23;
D.831_27 = (*c_26)[D.828_13];
D.832_28 = D.831_27 + tmp2_17;
(*c_26)[D.828_13] = D.832_28;
i_30 = i_1 + 1;
if (i_1 == D.824_4) goto <L7>; else goto <L11>;
Invalid sum of incoming frequencies 866, should be 1000
<L7>:;
return;
<L16>:;
goto <bb 7> (<L7>);
------------------------------------------------------
in .t49.copyrename2:
<bb 2>:
D.824_4 = *n_3;
if (D.824_4 <= 0) goto L.4; else goto <L1>;
# S.7_5 = PHI <S.7_32(3), 1(2)>;
<L1>:;
D.826_31 = S.7_5 + -1;
(*c_26)[D.826_31] = 0.0;
S.7_32 = S.7_5 + 1;
if (D.824_4 < S.7_32) goto L.4; else goto <L1>;
L.4:;
if (D.824_4 > 0) goto <L3>; else goto <L7>;
# i_11 = PHI <1(4)>;
<L3>:;
# i_1 = PHI <i_11(5), i_30(6)>;
<L11>:;
D.828_13 = i_1 + -1;
D.820_15 = (*a_14)[D.828_13];
tmp_16 = __builtin_pow (D.820_15,
3.33333333333333314829616256247390992939472198486e-1);
tmp2_17 = __builtin_pow (tmp_16, 2.0e+0);
tmp4_18 = __builtin_pow (tmp2_17, 2.0e+0);
D.829_22 = (*b_21)[D.828_13];
D.830_23 = D.829_22 + tmp4_18;
(*b_21)[D.828_13] = D.830_23;
D.831_27 = (*c_26)[D.828_13];
D.832_28 = D.831_27 + tmp2_17;
(*c_26)[D.828_13] = D.832_28;
i_30 = i_1 + 1;
if (i_1 == D.824_4) goto <L7>; else goto <L11>;
<L7>:;
return;
--
Summary: DOM messes up "incoming frequencies" for some BBs
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25623
More information about the Gcc-bugs
mailing list