Skip to content
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

Check normalizedNaN flag on (d/f)bits2(l/i) nodes #18949

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

r30shah
Copy link
Contributor

@r30shah r30shah commented Feb 13, 2024

In DynamicLiteralPool optimization, we add aload node denoting the address of literal base as a child of certain nodes when certain constant normalization is needed. For example, when OpenJ9 recognizes and inlines floatToIntBits or doubleToLongBits, it uses the fbits2i and dbits2l nodes respectively. Java specification requires those method to return normalize/canonical NaN value if the floating point operand is NaN. Dynamic Literal Pool optimization would attach an aload node denoting address of literal pool base to such nodes. In case when we are inlining floatToRawIntBits / doubleToRawLongBits , we are not required to return the normalize for of NaN for all NaN operands and simply return the raw bits representing floating point value. In such case, DynamicLiteralPool optimization do not need to attach extra child to node for literal base. This commit checks if normalization is required or not for such operation before attaching extra node for literal base.

Fixes: #18874

@r30shah
Copy link
Contributor Author

r30shah commented Feb 13, 2024

On my Linux on Z machine, I have verified that with the changes, I can reproduce the failures with reliable failing rate (24/41). With this changes, I do not see the failure.

Marking it WIP while I am testing the changes through personal builds.

Verified

This commit was signed with the committer’s verified signature.
jalaziz Jameel Al-Aziz
In DynamicLiteralPool optimization, we add `aload` node denoting the
address of literal base as a child of certain nodes when certain
constant normalization is needed. For example, when OpenJ9 recognizes
and inlines `floatToIntBits` or `doubleToLongBits`, it uses the fbits2i
and dbits2l nodes respectively. Java specification requires those method
to return normalize/canonical NaN value if the floating point operand is
NaN. Dynamic Literal Pool optimization would attach an aload node
denoting address of literal pool base to such nodes. In case when we are
inlining `floatToRawIntBits` / `doubleToRawLongBits` , we are not
required to return the normalize for of NaN for all NaN operands and
simply return the raw bits representing floating point value. In such
case, DynamicLiteralPool optimization do not need to attach extra
child to node for literal base. This commit checks if normalization is
required or not for such operation before attaching extra node for
literal base.

Fixes: eclipse-openj9#18874

Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
@r30shah
Copy link
Contributor Author

r30shah commented Feb 14, 2024

Personal Builds testing the changes for sanity :
Pipeline-Build-Test-Personal/20661/ (JDK11 and JDK17)
Pipeline_Build_Test_JDK21_s390x_linux/188/ (JDK21)

This one is ready for review and merge. @joransiu Can I request you to review and merge these changes ?

FYI @mpirvu @vijaysun-omr

@joransiu
Copy link
Member

Jenkins test sanity zlinux jdk21

@joransiu joransiu merged commit 8ce1cab into eclipse-openj9:master Feb 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash vmState=0x00000000 Compiled_method=java/lang/FdLibm$RemPio2.__ieee754_rem_pio2(D[D)I
2 participants