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 Math.max and Math.min for Floating Points #20185

Merged
merged 3 commits into from
Oct 30, 2024

Commits on Oct 28, 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: Matthew Hall <[email protected]>
    matthewhall2 committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    925d44a 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 fmin/fmax/dmin/dmax nodes
    
    Signed-off-by: Sarwat Shaheen <[email protected]>
    sarwat12 authored and matthewhall2 committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    aefcc07 View commit details
    Browse the repository at this point in the history
  3. Support Math.max/min for floating points w.r.t java spec

    - spearate evaluators for J9 vs OMR to support differing behaviour (OMR
      complies with IEEE_754, while J9 returns the first NaN (if present)
    - +0.0 compares as strictly greater than -0.0
    
    Signed-off-by: Matthew Hall <[email protected]>
    matthewhall2 committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    bc2c3cf View commit details
    Browse the repository at this point in the history