RFR: 8338126 : C2 SuperWord: VectorCastF2HF / vcvtps2ph produces wrong results for vector length 2 [v2]
Sandhya Viswanathan
sviswanathan at openjdk.org
Mon Oct 14 23:35:43 UTC 2024
On Mon, 14 Oct 2024 12:18:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Sandhya Viswanathan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update test case
>
> test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVector.java line 76:
>
>> 74: sout[i+1] = Float.floatToFloat16(finp[i+1]);
>> 75: }
>> 76: }
>
> Your test looks different than the one that I added on JIRA. Can you please add that one as well?
Thanks for pointing that out. I have modified the contents of the loop kernel to match your testcase loop kernel now. I also verified that it fails before the fix and passes after the fix.
Before the fix the test fails:
Test results: failed: 1
And the jtr file shows the following:
Custom Run Test: @Run: kernel_test_float_float16 - @Tests:
{test_float_float16,test_float_float16_strided,test_float_float16_short_vector}:
compiler.lib.ir_framework.shared.TestRunException: There was an error while invoking @Run method public void
compiler.vectorization.TestFloatConversionsVector.kernel_test_float_float16()
at compiler.lib.ir_framework.test.CustomRunTest.invokeTest(CustomRunTest.java:162)
at compiler.lib.ir_framework.test.CustomRunTest.run(CustomRunTest.java:87)
at compiler.lib.ir_framework.test.TestVM.runTests(TestVM.java:861)
at compiler.lib.ir_framework.test.TestVM.start(TestVM.java:252)
at compiler.lib.ir_framework.test.TestVM.main(TestVM.java:165)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
at java.base/java.lang.reflect.Method.invoke(Method.java:573)
at compiler.lib.ir_framework.test.CustomRunTest.invokeTest(CustomRunTest.java:159)
... 4 more
Caused by: java.lang.RuntimeException: assertEquals expected: 18483 but was: 0
at jdk.test.lib.Asserts.fail(Asserts.java:691)
at jdk.test.lib.Asserts.assertEquals(Asserts.java:204)
at jdk.test.lib.Asserts.assertEquals(Asserts.java:191)
at compiler.vectorization.TestFloatConversionsVector.kernel_test_float_float16(TestFloatConversionsVector.java:112)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
... 6 more
After the fix the test passes with no failures:
Test results: passed: 1
Please let me know if this works or you would like to see any other change.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21480#discussion_r1800232110
More information about the hotspot-compiler-dev
mailing list