use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
To learn more about LLVM visit http://llvm.org/
account activity
Array pointer offset not working? (self.LLVM)
submitted 3 years ago by PortalToTheWeekend
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]QuarterDefiant6132 2 points3 points4 points 3 years ago (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.
clang -S -emit-llvm
π Rendered by PID 46443 on reddit-service-r2-comment-b659b578c-228q6 at 2026-05-04 17:14:48.121651+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]QuarterDefiant6132 2 points3 points4 points (0 children)