[Bug tree-optimization/69292] [graphite] ICE with -floop-nest-optimize
vries at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 15 09:29:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69292
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE with |[graphite] ICE with
|-floop-nest-optimize |-floop-nest-optimize
--- Comment #1 from vries at gcc dot gnu.org ---
The first basic block starts with the load from m:
...
;; basic block 2, loop depth 0, count 0, freq 2, maybe hot
# VUSE <.MEM_11(D)>
_8 = mD.1755[0];
if (_8 > 0)
goto <bb 7>;
else
goto <bb 19>;
...
The load is labelled as S_2:
...
Converting dr: pdr_0 (read
in gimple stmt: _8 = m[0];
data accesses: [P_8] -> { S_2[] -> [1, 0] }
subscript sizes: { [1, 0] }
)
To polyhedral representation:
- access functions: [P_8] -> { S_2[] -> [1, 0] }
- subscripts: { [1, 0] }
...
And after the loop nest transformation, the S_2 statement is now the last:
...
AST generated by isl:
{
for (int c1 = 0; c1 < P_8; c1 += 51)
for (int c2 = 0; c2 < P_8; c2 += 51)
for (int c3 = c1; c3 <= min(P_8 - 1, c1 + 50); c3 += 1)
for (int c4 = c2; c4 <= min(P_8 - 1, c2 + 50); c4 += 1)
S_4(c3, c4);
for (int c1 = 0; c1 <= 19; c1 += 1)
for (int c2 = 0; c2 < P_8; c2 += 1) {
S_10(c1, c2);
for (int c4 = 0; c4 < P_8; c4 += 1)
S_11(c1, c2, c4);
}
S_2();
}
...
while P_8 is dependent on the result (_8) of S_2.
So either:
- the transformation is invalid because is doesn't respect the dependence from
S_2 to _P8, or
- the code generation mechanism fails to instantiate P_8 before the first use.
More information about the Gcc-bugs
mailing list