RFR: 8325438: Add exhaustive tests for Math.round intrinsics [v3]

Hamlin Li mli at openjdk.org
Tue Mar 12 20:29:13 UTC 2024


On Tue, 12 Mar 2024 16:54:03 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> Thanks for changing to randomness. Thanks very much for your work!
> 
> I have a few more requests/suggestions/questions :)

Thanks for detailed reviewing and suggestion! :)
I resolved some comments, and tried to answer some of your questions, please have a look again.

Also have a question: currently I'm generating golden value in following way:

  @DontCompile
  long golden_round(double d) {
    return Math.round(d);
  }

Will it make sure Math.round invocation here are the interpreter version? Or maybe it can be calling the intrinsic version?
If that's the case, I think one way to resolve this issue is to copy the piece of library code of Math.round here, I see some existing test cases also use this way to get the golden value. How do you think about it?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17753#issuecomment-1992519401


More information about the hotspot-compiler-dev mailing list