-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
Description
| Bugzilla Link | 30615 |
| Version | trunk |
| OS | Linux |
| Blocks | #30613 |
| Attachments | Three files (two .c files and one .ll file) that show buggy behavior. |
| CC | @hfinkel,@aqjune,@nunoplopes,@sanjoy |
Extended Description
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.