[Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 28 15:50:50 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96344
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|3rdd case of |3rdd case of
|gnat.dg/opt86a.adb fails |gnat.dg/opt86a.adb fails
| |because of VRP
Component|ada |tree-optimization
--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
The difference is that, on x86-64, the third case is preoptimized (.dse2):
<bb 18> [local count: 1072024872]:
system.secondary_stack.ss_release (&FRAME.22.M12b);
_6 = s3_35 == 1;
_7 = s3_35 == 4;
_8 = _6 | _7;
_57 = s3_35 == 8;
_56 = _8 | _57;
if (_56 != 0)
goto <bb 19>; [0.08%]
else
goto <bb 20>; [99.92%]
whereas it is not on PowerPC64:
<bb 18> [local count: 1072024872]:
system.secondary_stack.ss_release (&FRAME.22.M12b);
if (_31 == 1)
goto <bb 21>; [0.04%]
else
goto <bb 19>; [99.96%]
<bb 19> [local count: 1071596063]:
if (s3_32 == 4)
goto <bb 21>; [0.04%]
else
goto <bb 20>; [99.96%]
<bb 20> [local count: 1071167425]:
if (s3_32 == 8)
goto <bb 21>; [0.04%]
else
goto <bb 22>; [99.96%]
Note the _31 in the first arm instead of s3_32: VRP1 has propagated
s3_32 = (opt86_pkg__enum) _31;
into the first arm but not the others... So -fno-tree-vrp is a workaround.
More information about the Gcc-bugs
mailing list