-
Notifications
You must be signed in to change notification settings - Fork 71
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
fix 128bits ctlz intrinsincs UB #635
base: master
Are you sure you want to change the base?
Conversation
It looks like the some CI jobs are failing on
which is some code I didn't touch. Can my changes have some side effects ? Any hints ? |
Not sure it's related. I opened a new dummy PR to check if the tests pass, though. |
The CI passed, so the problem is in here. I suspect this is because you changed the return type: it used to return an array type and your change makes it return a |
The return type of the
which will get an element in the array and cast it as result_type which is Edit: formatting |
Ok, finally found the line pointing in my change The problem I see is that the if branch should have been taken. |
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.
Sorry for the delay: I've been very busy.
let result = self.current_func() | ||
.new_local(None, array_type, "count_loading_zeroes_results"); | ||
|
||
// Algorithm from: https://stackoverflow.com/a/28433850/389119 updated to check for high 64bits being 0 |
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.
It seems your new algorithm significantly diverges from the one linked here.
If so, could you please replace this link with another pointing to the algorithm you used? If you can't, could you please add comments below to make this easier to understand?
Fixes #604
This is the GIMPLE code generated