<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Scalar dependence on induction variable when lower bound is not synthesizable"
href="https://llvm.org/bugs/show_bug.cgi?id=28871">28871</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Scalar dependence on induction variable when lower bound is not synthesizable
</td>
</tr>
<tr>
<th>Product</th>
<td>Polly
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Optimizer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>polly-dev@googlegroups.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm@meinersbur.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>This inner loops is not detected as parallel (-mllvm
-polly-process-unprofitable -mllvm -polly-parallel):
for (int j = 1; j <= lastrow - firstrow + 1; j++) {
int e = rowstr[j + 1];
int b = rowstr[j];
for (int k = b; k < e; k++) {
colidx[k] = colidx[k] - firstcol + 1;
}
}
AST output:
Stmt_for_body();
if (p_1_loaded_from_rowstr >= p_0_loaded_from_rowstr + 1)
Stmt_for_body7_lr_ph();
#pragma minimal dependence distance: 1
for (int c0 = 0; c0 < -p_0_loaded_from_rowstr + p_1_loaded_from_rowstr;
c0 += 1)
Stmt_for_body7(c0);
Whereas this one is:
for (int j = 1; j <= lastrow - firstrow + 1; j++) {
int e = rowstr[j + 1];
int b = rowstr[j];
for (int k = 0; k < e-b; k++)
{
colidx[k+b] = colidx[k+b] - firstcol + 1;
}
}
AST output:
Stmt_for_body();
if (p_1_loaded_from_rowstr >= p_0_loaded_from_rowstr + 1)
Stmt_for_body8_lr_ph();
#pragma simd
#pragma known-parallel
for (int c0 = 0; c0 < -p_0_loaded_from_rowstr + p_1_loaded_from_rowstr;
c0 += 1)
Stmt_for_body8(c0);
This is cause by the lower bound ('b') appearing in the lower bound of the SCEV
for the induction variable. It is not considered synthesizable albeit
load-hoisted. Thus causing scalar dependences created for its PHINode.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>