[Bug tree-optimization/92283] [10 Regression] 454.calculix miscomparison since r276645 with -O2 -march=znver2
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 8 13:01:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92283
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amker at gcc dot gnu.org
--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> ---
The fortran loop is
real*8 vold(0:3,*),v(0:3,*)
...
if((iperturb.ne.0).and.(nmethod.eq.1)) then
vmax=0.d0
do i=1,nk
do j=jmin,jmax
vmax=max(vmax,dabs(v(j,i)))
c write(*,*) i,j,vold(j,i),v(j,i),vmax
v(j,i)=v(j,i)+vold(j,i)
enddo
enddo
endif
and the .gimple diff
@@ -2536,21 +2970,29 @@
vmax__lsm.757_3905 = [results.f:130:0] *vmax_2002(D);
[results.f:130:0] _31 = (integer(kind=8)) i.120_4019;
[results.f:130:0] _32 = _31 * 4;
+ ivtmp.773_566 = (sizetype) jmin_1722;
<bb 20> [local count: 4326176]:
- # j.121_4017 = PHI <[results.f:129:0] jmin_1722(19), [results.f:129:0]
_39(670)>
+ # ivtmp.773_3273 = PHI <ivtmp.773_566(19), ivtmp.773_1666(670)>
# vmax__lsm.757_1845 = PHI <vmax__lsm.757_3905(19), [results.f:130:0]
M.64_2048(670)>
- [results.f:130:0] _33 = (integer(kind=8)) j.121_4017;
- [results.f:130:0] _34 = _32 + _33;
- [results.f:130:0] _35 = _34 + -4;
- [results.f:130:0] _36 = [results.f:130:0] [results.f:130:0]
(*v_2012(D))[_35];
+ _2429 = (sizetype) _32;
+ _565 = _2429 * 8;
+ _4606 = v_2012(D) + _565;
+ [results.f:130:0] _36 = MEM[base: _4606, index: ivtmp.773_3273, step: 8,
offset: -32B];
[results.f:130:0] _2047 = ABS_EXPR <_36>;
[results.f:130:0] M.64_2048 = MAX_EXPR <vmax__lsm.757_1845, _2047>;
- [results.f:132:0] _37 = [results.f:132:0] [results.f:132:0]
(*vold_2011(D))[_35];
+ _4529 = (sizetype) _32;
+ _558 = _4529 * 8;
+ _4481 = vold_2011(D) + _558;
+ [results.f:132:0] _37 = MEM[base: _4481, index: ivtmp.773_3273, step: 8,
offset: -32B];
[results.f:132:0] _38 = _36 + _37;
- [results.f:132:0] [results.f:132:0] [results.f:132:0] (*v_2012(D))[_35] =
_38;
- [results.f:129:0] _39 = j.121_4017 + 1;
- [results.f:129:0] if (_39 > jmax_1721)
+ _564 = (sizetype) _32;
+ _4573 = _564 * 8;
+ _560 = v_2012(D) + _4573;
+ [results.f:132:0] MEM[base: _560, index: ivtmp.773_3273, step: 8, offset:
-32B] = _38;
+ [results.f:129:0] ivtmp.773_1666 = ivtmp.773_3273 + 1;
+ _3693 = (integer(kind=4)) ivtmp.773_1666;
+ [results.f:129:0] if (_3693 > jmax_1721)
goto <bb 21>; [11.00%]
else
goto <bb 670>; [89.00%]
but as far as I can see the IVOPTs transform is correct, assembly differences
are too large to swallow though (trying to disable scheduling).
More information about the Gcc-bugs
mailing list