RFR: 8347405: MergeStores with reverse bytes order value [v13]

Fei Yang fyang at openjdk.org
Thu Mar 6 02:20:00 UTC 2025


On Thu, 6 Mar 2025 01:59:55 GMT, kuaiwei <duke at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/c2/TestMergeStores.java line 810:
>> 
>>> 808:                    IRNode.REVERSE_BYTES_L, "1"},
>>> 809:         applyIf = {"UseUnalignedAccesses", "true"},
>>> 810:         applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"})   // Exclude RISCV64 because ReverseBytes are not supported
>> 
>> Seems to me the code comment could be made more accurate. In fact, all the `ReverseBytes` variants will be available on riscv64 if we have the Zbb extension [1]. And I see the newly added IR tests in this file also works on such platforms. I wonder if there is an easy way to enable these IR tests for these platforms.
>> 
>> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/riscv_b.ad#L181
>
> @RealFYang , thanks for your comments. As you mentioned, IR test framework can not check Zbb extension for RISCV platform, so I disable it for RISCV64. I think we can make a new PR to enhance IR test framework and enable the test.

That works for me. Maybe you can update the code comments to make it more accurate? Like:
`// Exclude riscv64 where ReverseBytes is only conditionally supported`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23030#discussion_r1982539011


More information about the hotspot-compiler-dev mailing list