-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CIR generated LLVM code for pointer arithmetic misses inbounds #952
Comments
up for take. |
I can work on it to learn ClangIR. |
@liusy58 welcome aboard! The website has some useful resources, and the Discord channel (use this link to join the LLVM Discord server if you haven't already) is a great place to ask questions (as is this issue). The general idea here would be to find the code in |
Thank you! I know that ClangIR is good for analysis and can make c++ safer. Apart from this, can we do something else? |
Thanks for willing to help out! Along this line of IR differences, depending on your interests, there are a couple of issues in my mind that we could use help.
I'll create issues for above 2 issues by next Monday. |
Interesting topics. I love this! |
Ok, thank you! |
sample code
void foo(int *iptr) { iptr + 2; }
Clang generated code:
https://godbolt.org/z/8Yjnhxhz4
where we have
getelementptr inbounds i32, ptr %0, i64 2
CIR generated LLVM code is like
https://godbolt.org/z/Wzdcvea46
where we see
getelementptr i32, ptr %3, i64 2,
We are missing
inbounds
here.The text was updated successfully, but these errors were encountered: