-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 flags checks to BMI1 intrinsic lowering #66736
Conversation
…gs in x84 from being altered
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsFixes #66709 On x86 longs are decomposed into two integer nodes. This bug was caused by one of those integer nodes being recognised as part of the This PR adds in flags checks on all nodes being removed to see if they have side effect and if they have the lowering is not attempted. I have added the same checks to /cc @dotnet/jit-contrib
|
Can you add the regression test? |
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.
Can you also add the test case that uncovered this?
Feel free to add it to your existing tests, if that works out.
I've updated the bmi1 tests to have 64 bit overloads and verified that they fail on current main as expected. |
Failure is #66571. |
* add flags checks to BMI1 intrinsic lowering to prevent decomposed longs in x84 from being altered * update bmji1intrinsics tests
Fixes #66709
On x86 longs are decomposed into two integer nodes. This bug was caused by one of those integer nodes being recognised as part of the
blsi
pattern,x & -x
and transformed without the second node being included. On x86 the 64 bit version of the intrinsic is not available so the lowering of a 64 bit operation to the intrinsic is not possible.This PR adds in flags checks on all nodes being removed to see if they have side effect and if they have the lowering is not attempted.
I have added the same checks to
blsr
andandn
even though I have confirmed that they do not suffer from the same bug. This seemed prudent to me in case future jit changes expose a situation where it does become possible for those lowering to be affected./cc @dotnet/jit-contrib