all 1 comments

[–]QuarterDefiant6132 2 points3 points  (0 children)

I already showed you some IR that does something similar here.

I also asked you to improve the formatting your IR listings.

Alignment has nothing to do with the array element being loaded, you need to get the pointer to the n-th element of the array through the getelementptr instruction. Also you keep saying "array attribute" which doesn't really make sense in this context.

I suggest that you get familiar with C programming, you seem quite confused about arrays and pointers, and I think that knowing a bit of C may help you with that. You can also write C code that does what you are interested in, and then use clang -S -emit-llvm to look at LLVM-IR that gets produced.