[LLVMbugs] [Bug 20118] New: llc handles pointer arithmetic in a strange way, Linux, trunk, regression from version 3.4
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jun 24 12:46:22 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20118
Bug ID: 20118
Summary: llc handles pointer arithmetic in a strange way,
Linux, trunk, regression from version 3.4
Product: tools
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: llc
Assignee: unassignedbugs at nondot.org
Reporter: ili.filippov at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 12700
--> http://llvm.org/bugs/attachment.cgi?id=12700&action=edit
Reproducer
To reproduce:
llc reproducer.ll -mattr=+avx2 -o c.s (llc from trunk)
clang c.s test.cpp -O0 (any clang)
test.cpp:
#include <stdio.h>
extern "C" {
extern void f_fu(float *result);
}
int main(int argc, char *argv[]) {
float returned_result[64] __attribute__((aligned(64)));
f_fu(returned_result);
for (int i = 0; i < 8; ++i) {
printf("%f, ", returned_result[i]);
}
printf("\n");
return 0;
}
reproducer.ll is attached.
The right answer is
"6.000000, 7.000000, 8.000000, 9.000000, 10.000000, 11.000000, 12.000000,
13.000000,"
and if we take llc from 3.4 version we will have this answer. However llc from
trunk results in:
"6.000000, 15.000000, 8.000000, 9.000000, 2.000000, 11.000000, 12.000000,
13.000000,", which is wrong.
--
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/20140624/1807ee0c/attachment.html>
More information about the llvm-bugs
mailing list