<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Polly miscompile when using array accesses with different sizes"
href="https://bugs.llvm.org/show_bug.cgi?id=35108">35108</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Polly miscompile when using array accesses with different sizes
</td>
</tr>
<tr>
<th>Product</th>
<td>Polly
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</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></table>
<p>
<div>
<pre>$ cat updateDimensionality.c
#include <stdint.h>
#include <stdio.h>
int main() {
uint64_t A[1][256] = {0};
for (int i = 0; i < 64; i += 1) {
A[0][i] = 42;
}
for (int i = 0; i < 128; i += 1) {
((uint32_t*)&A[0][0])[65 + i*2] = 21;
}
for (int i = 0; i < 64; i += 1) {
A[0][i*2] = 2;
}
printf("Result: %lu\n", A[0][64]);
return 0;
}
$ clang updateDimensionality.c -O3 -o updateDimensionality-O3 &&
./updateDimensionality-O3
Result: 2
$ clang updateDimensionality.c -O3 -o updateDimensionality-polly -mllvm -polly
-mllvm -polly-process-unprofitable -mllvm -polly-position=early -mllvm
-polly-opt-fusion=max && ./updateDimensionality-polly
Result: 90194313218
The fault is in MemoryAccess::updateDimensionality(). It is the same issue that
keeps Polly from optimizing Polybench's gramschmidt from being optimized.
Tobias was already working on a patch.</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>