-
Notifications
You must be signed in to change notification settings - Fork 706
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
Test result of arraycmp for value type comparison #16776
Test result of arraycmp for value type comparison #16776
Conversation
Leaving this as a draft pull request while running tests. |
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.
LGTM. Thank you for fixing this bug! Just minor comments on the code comments
Thanks, Annabelle @a7ehuo! I have adjusted the comments in commit 5555dc7cdbe1aef429959c6471286298fc4efd4e. If you are OK with those changes, I will squash the commits. |
LGTM. I've approved the change |
The arraycmp operation produces a result of zero if the memory being compared is equal, one if the first operand is less than second, or two if the second operand is less than the first. The transformation of <object{Equality|Inequality}Comparison> used arraycmp assuming that the result would be zero for equality or one for inequality. This change adds an icmpeq or icmpne to compare the result of the arraycmp with zero in order to yield a value in the expected range: {0,1}. Signed-off-by: Henry Zongaro <zongaro@ca.ibm.com>
5555dc7
to
1bbd087
Compare
Squashed these changes into commit 1bbd087 |
Jenkins test sanity xlinuxval jdknext |
Jenkins test sanity all jdk17 |
@0xdaryl Daryl, have you had a chance to look at this change? |
The
arraycmp
operation produces a result of zero if the memory being compared is equal, one if the first operand is less than the second, or two if the second operand is less than the first. The transformation of<object{Equality|Inequality}Comparison>
usedarraycmp
assuming that the result would be zero for equality or one for inequality. This change adds anicmpeq
oricmpne
to compare the result of thearraycmp
with zero in order to yield a value in the expected range: {0,1}.