RFR: 8325438: Add exhaustive tests for Math.round intrinsics [v12]
Andrew Haley
aph at openjdk.org
Sun Apr 28 11:37:09 UTC 2024
On Tue, 23 Apr 2024 09:46:08 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> HI,
>> Can you have a look at this patch adding some tests for Math.round instrinsics?
>> Thanks!
>>
>> ### FYI:
>> During the development of RoundVF/RoundF, we faced the issues which were only spotted by running test exhaustively against 32/64 bits range of int/long.
>> It's helpful to add these exhaustive tests in jdk for future possible usage, rather than build it everytime when needed.
>> Of course, we need to put it in `manual` mode, so it's not run when `-automatic` jtreg option is specified which I guess is the mode CI used, please correct me if I'm assume incorrectly.
>
> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>
> Add vectorized and scalar version Float tests checking full 32 bits range
test/hotspot/jtreg/compiler/vectorization/TestRoundVectorFloatAll.java line 99:
> 97: System.out.println("Verification");
> 98: int errn = 0;
> 99: for (long l = Integer.MIN_VALUE; l <= Integer.MAX_VALUE; l+=ARRLEN) {
Can't you just do the obvious simple thing here?
test/hotspot/jtreg/compiler/vectorization/TestRoundVectorFloatAll.java line 102:
> 100: for (int i = 0; i < ARRLEN; i++) {
> 101: input[i] = (int)(l+i);
> 102: }
What is this array for? As far as i can tell it does nothing useful to batch the test results.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1582089522
PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1582089157
More information about the core-libs-dev
mailing list