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

Support java behaviour w.r.t fmin/fmax/dmin/dmax #20185

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Sep 18, 2024

  1. Add new build test for Math.max and Math.min

    Add functional tests for `Math.max` and `Math.min`:
    - to test specific float and double corner cases
    - test with NaN, +0, & -0, values to confirm respective omr changes
    - test all possible execution paths
    
    Signed-off-by: Sarwat Shaheen <sarwat.shaheen@yahoo.com>
    sarwat12 authored and matthewhall2 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    99dfbb0 View commit details
    Browse the repository at this point in the history
  2. Enable inlining of fmax/fmin/dmax/dmin on Z

    - Adds java_lang_Math_max/min_float/double as a recognized method
    - Adds a SupportsInlineMath_MaxMin_FD flag to the Z code generator
    - Flag is only set in Z if the TR_disableInlineMath_MaxMin_FD environment variable is not set
    - If the flag is set, call nodes are transformed to a functionally equivalent tree that uses fmax/fmin/dmax/dmin
    
    Signed-off-by: Sarwat Shaheen <sarwat.shaheen@yahoo.com>
    sarwat12 authored and matthewhall2 committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    fbc771c View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Added support for java behaviour of fmin/fmax/etc + fixed tests

    - separate evaluators for J9 vs omr to return the NaN unchanged
    - compare int/long bits instead of float bits to check behaviour for +-0 and NaNs
    
    Signed-off-by: Matthew Hall <matthew.hall3@outlook.com>
    matthewhall2 committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    8dcb19d View commit details
    Browse the repository at this point in the history