RFR: 8325438: Add exhaustive tests for Math.round intrinsics [v13]
Hamlin Li
mli at openjdk.org
Tue May 7 17:32:21 UTC 2024
On Tue, 7 May 2024 13:30:12 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix issues; modify vm options to make sure test the expected behaviors.
>
> test/hotspot/jtreg/compiler/floatingpoint/TestRoundFloatAll.java line 75:
>
>> 73: return (int) a;
>> 74: }
>> 75: }
>
> At first, I was worried about the indentation, then realized the original code had the strange indentation.
> Would there be a way to put this method in a shared file, so that you do not need to paste it everywhere?
moved to a shared lib file.
> test/hotspot/jtreg/compiler/vectorization/TestRoundVectorFloatAll.java line 34:
>
>> 32: * @run main/othervm -XX:+PrintIdeal -XX:-TieredCompilation -XX:CompileThresholdScaling=0.3 -XX:MaxVectorSize=8 -XX:+UseSuperWord -XX:CompileCommand=compileonly,compiler.vectorization.TestRoundVectorFloatAll::test* compiler.vectorization.TestRoundVectorFloatAll
>> 33: * @run main/othervm -XX:+PrintIdeal -XX:-TieredCompilation -XX:CompileThresholdScaling=0.3 -XX:MaxVectorSize=16 -XX:+UseSuperWord -XX:CompileCommand=compileonly,compiler.vectorization.TestRoundVectorFloatAll::test* compiler.vectorization.TestRoundVectorFloatAll
>> 34: * @run main/othervm -XX:+PrintIdeal -XX:-TieredCompilation -XX:CompileThresholdScaling=0.3 -XX:MaxVectorSize=32 -XX:+UseSuperWord -XX:CompileCommand=compileonly,compiler.vectorization.TestRoundVectorFloatAll::test* compiler.vectorization.TestRoundVectorFloatAll
>
> Please check which flags you actually need here....
removed `-XX:+PrintIdeal`
others seems useful to me.
> test/hotspot/jtreg/compiler/vectorization/TestRoundVectorFloatAll.java line 43:
>
>> 41: public class TestRoundVectorFloatAll {
>> 42: private static final int ITERS = 11000;
>> 43: private static final int ARRLEN = 997;
>
> Could you randomize this value ever so slightly? That way, the boundaries of the array are at different places. I think also that the size should be a little larger, just to ensure that we get maximum vector lengths.
Make sense, done.
> test/hotspot/jtreg/compiler/vectorization/TestRoundVectorFloatRandom.java line 202:
>
>> 200: }
>> 201:
>> 202: // test cases for NaN, Inf, subnormal, and so on
>
> just for completeness: +0.0 and -0.0
added
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1592838750
PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1592838951
PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1592839461
PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1592838230
More information about the hotspot-compiler-dev
mailing list