-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add the range statement to the constant resolver #612
Conversation
Codecov ReportBase: 93.66% // Head: 93.67% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #612 +/- ##
==========================================
+ Coverage 93.66% 93.67% +0.01%
==========================================
Files 44 44
Lines 16804 16815 +11
==========================================
+ Hits 15740 15752 +12
+ Misses 1064 1063 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…validation-in-case
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.
I dont believe that ranges will work that easily
we would need to unroll it like:
case (3..10)
--> needs to become case 3,4,5,6,7,8,9,10
or we need to rewrite the switch-statement to if-elseif-elseif-...-else
%DAYS_IN_MONTH = getelementptr inbounds %main, %main* %0, i32 0, i32 0 | ||
%SIXTY = getelementptr inbounds %main, %main* %0, i32 0, i32 1 | ||
%load_DAYS_IN_MONTH = load i32, i32* %DAYS_IN_MONTH, align 4 | ||
switch i32 %load_DAYS_IN_MONTH, label %else [ |
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.
does this look correct? this switch does nothing but else
, right?
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.
I also thought this was strange, I can add a correctness test with the constants, but we do have some that take care of the range
This commit is only making sure the constants in the ranges are resolved. |
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.
yep I didnt look into the else thoroughly
Fixes #591