This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/71632] [7 Regression] hang at -O3 on x86_64-linux-gnu
- From: "amker at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Jun 2016 11:49:36 +0000
- Subject: [Bug tree-optimization/71632] [7 Regression] hang at -O3 on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-71632-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71632
--- Comment #3 from amker at gcc dot gnu.org ---
The commit if-converts below loop:
<bb 4>:
# b.5_38 = PHI <0(3), _10(7)>
# d_40 = PHI <d_42(3), iftmp.0_22(7)>
# ivtmp_17 = PHI <5(3), ivtmp_37(7)>
_6 = (long unsigned int) b.5_38;
_7 = _6 * 8;
_8 = _5 + _7;
_9 = *_8;
if (_9 > d_40)
goto <bb 6>;
else
goto <bb 5>;
<bb 5>:
<bb 6>:
# iftmp.0_22 = PHI <1.0e+0(4), 0.0(5)>
_10 = b.5_38 + 1;
ivtmp_37 = ivtmp_17 - 1;
if (ivtmp_37 != 0)
goto <bb 7>;
else
goto <bb 8>;
<bb 7>:
goto <bb 4>;
into :
<bb 4>:
# b.5_38 = PHI <0(3), _10(5)>
# d_40 = PHI <d_42(3), iftmp.0_22(5)>
# ivtmp_17 = PHI <5(3), ivtmp_37(5)>
_6 = (long unsigned int) b.5_38;
_7 = _6 * 8;
_8 = _5 + _7;
_9 = *_8;
iftmp.0_22 = _9 > d_40 ? 1.0e+0 : 0.0;
_10 = b.5_38 + 1;
ivtmp_37 = ivtmp_17 - 1;
if (ivtmp_37 != 0)
goto <bb 5>;
else
goto <bb 6>;
<bb 5>:
goto <bb 4>;
It looks like a correct transform, even the result loop can't be vectorized.
Then the loop is completely unrolled and and long single def-use chain for
"iftmp" is generated. I suspect this causes exponential behavior in TER?