-
Notifications
You must be signed in to change notification settings - Fork 171
LLVM: Support Unsigned Int in visit_Variable #2171
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, but after merging let's add tests for all unsigned kinds as well as checking that the value is present in the variable correctly.
What exactly was the problem --- that this is using global variables?
Please see #2170 (comment). I think the lpython/src/libasr/codegen/asr_to_llvm.cpp Lines 2356 to 2378 in ea9715b
|
Yes, I tested different unsigned kinds in https://github.com/lcompilers/lpython/pull/2164/files#diff-b6a08444f0697e1ea781c919bcdf3b29eba7b542bddef56ce0125f3c2997c973. |
x : i32 | ||
|
||
for i in range(i32(u)): | ||
x = i * 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If in case we update the changes in this PR, I suggest we add an assert in this test case (and also possibly a print statement before the assert).
Fixes #2170