[llvm-bugs] [Bug 35108] New: Polly miscompile when using array accesses with different sizes
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 27 09:11:57 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=35108
Bug ID: 35108
Summary: Polly miscompile when using array accesses with
different sizes
Product: Polly
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: release blocker
Priority: P
Component: Optimizer
Assignee: polly-dev at googlegroups.com
Reporter: llvm at meinersbur.de
CC: llvm-bugs at lists.llvm.org
$ 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171027/68f7b723/attachment.html>
More information about the llvm-bugs
mailing list