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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to