With this update the isl AST generation extracts disjunctive constraints early
on. As a result, code that previously resulted in two branches with (close-to)
identical code within them:
if (P <= -1) {
for (int c0 = 0; c0 < N; c0 += 1)
Stmt_store(c0);
} else if (P >= 1)
for (int c0 = 0; c0 < N; c0 += 1)
Stmt_store(c0);
results now in only a single branch body:
if (P <= -1 || P >= 1)
for (int c0 = 0; c0 < N; c0 += 1)
Stmt_store(c0);
This resolves http://llvm.org/PR27559
Besides the above change, this isl update brings better simplification of
sets/maps containing existentially quantified dimensions and fixes a bug in
isl's coalescing.
llvm-svn: 272500
27 lines
561 B
C
27 lines
561 B
C
{
|
|
for (int c0 = 0; c0 <= 9; c0 += 1)
|
|
for (int c1 = 0; c1 <= 1; c1 += 1) {
|
|
if (c0 % 2 == 0) {
|
|
A(c0 / 2, c1);
|
|
} else {
|
|
B((c0 - 1) / 2, c1);
|
|
}
|
|
}
|
|
for (int c0 = 10; c0 <= 89; c0 += 1)
|
|
for (int c1 = 0; c1 <= 1; c1 += 1) {
|
|
if (c0 % 2 == 0) {
|
|
A(c0 / 2, c1);
|
|
} else {
|
|
B((c0 - 1) / 2, c1);
|
|
}
|
|
}
|
|
for (int c0 = 90; c0 <= 199; c0 += 1)
|
|
for (int c1 = 0; c1 <= 1; c1 += 1) {
|
|
if (c0 % 2 == 0) {
|
|
A(c0 / 2, c1);
|
|
} else {
|
|
B((c0 - 1) / 2, c1);
|
|
}
|
|
}
|
|
}
|