[llvm-bugs] [Bug 30615] New: Store <64 x i1> generates incorrect code
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 4 21:45:12 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30615
Bug ID: 30615
Summary: Store <64 x i1> generates incorrect code
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: juneyoung.lee at sf.snu.ac.kr
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17401
--> https://llvm.org/bugs/attachment.cgi?id=17401&action=edit
Three files (two .c files and one .ll file) that show buggy behavior.
`store <64 x i1> %1, <64 x i1>* ptr` generates incorrect code.
I attach the source code. I compiled these files with
```
clang -O2 -c -o main.o main.c
clang -O2 -c -o visitelem.o visitelem.c
llc -filetype=obj -o loadval.o loadval.ll
gcc loadval.o main.o visitelem.o -o main
./main
```
Without `store <64 x i1> %1, <64 x i1>* @globalvar, align 8`, in loadval.ll, it
prints
```
visitelem : 1111
visitelem : 1111
visitelem : 0
visitelem : 0
```
However with the store it prints
```
visitelem : 0
visitelem : 0
visitelem : 0
visitelem : 0
```
even if `%ptr` and `@globalvar` points to distinct address.
--
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/20161005/22a6158f/attachment.html>
More information about the llvm-bugs
mailing list