https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89098
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reproduceable on x86_64-linux with -m32 too. We have: _62 = stride.18_139 * 4; _281 = _62 + offset.19_147; _63 = stride.18_139 * 5; _282 = _63 + offset.19_147; _283 = size.20_140 + offset.19_147; _486 = stride.18_139 * 6; _487 = offset.19_147 + _486; _488 = stride.18_139 * 3; _489 = offset.19_147 + _488; _490 = stride.18_139 * 2; _491 = offset.19_147 + _490; before slsr and slsr changes that into: _62 = stride.18_139 * 4; _281 = _62 + offset.19_147; _63 = stride.18_139 * 5; _282 = _281 + stride.18_139; slsr_324 = stride.18_139 * 3; _283 = _281 + slsr_324; _486 = stride.18_139 * 6; _487 = _281 + _490; _488 = stride.18_139 * 3; _489 = _281 - stride.18_139; _490 = stride.18_139 * 2; _491 = _281 - _490; and the ICE is because _490 is used before definition. C testcase that ICEs even on x86_64-linux with -O2 --param max-slsr-cand-scan=1: void bar (int, int, int, int, int, int); int foo (int s, int o, int x) { int t0 = s * 7; if (x) { int t1 = s * 4; int t2 = t1 + o; int t3 = s * 5; int t4 = t3 + o; int t5 = t0 + o; int t6 = s * 6; int t7 = o + t6; int t8 = s * 3; int t9 = o + t8; int t10 = s * 2; int t11 = o + t10; bar (t2, t4, t5, t7, t9, t11); } return t0; }