RFR: 8372641: [s390x] Test failure TestMergeStores.java
Manuel Hässig
mhaessig at openjdk.org
Thu Nov 27 08:18:48 UTC 2025
On Thu, 27 Nov 2025 07:09:01 GMT, Harshit470250 <duke at openjdk.org> wrote:
> [JDK-8347405](https://bugs.openjdk.org/browse/JDK-8347405) introduced a mergeStores optimisation which requires ReverseBytesS opcode and as it was not implemented for s390 the test case is failing.
> I also implemented ReverseBytesUS.
Thank you for fixing this, @Harshit470250. The new instructions look good to me. I am only unsure about the cost (see comments below).
src/hotspot/cpu/s390/s390.ad line 11619:
> 11617: match(Set dst (ReverseBytesS src));
> 11618: predicate(UseByteReverseInstruction);
> 11619: ins_cost(DEFAULT_COST);
Would this not be twice the `DEFAULT_COST` since it uses two instructions?
Suggestion:
ins_cost(2 * DEFAULT_COST);
src/hotspot/cpu/s390/s390.ad line 11635:
> 11633: match(Set dst (ReverseBytesUS src));
> 11634: predicate(UseByteReverseInstruction);
> 11635: ins_cost(DEFAULT_COST);
Suggestion:
ins_cost(2 * DEFAULT_COST);
-------------
Changes requested by mhaessig (Committer).
PR Review: https://git.openjdk.org/jdk/pull/28523#pullrequestreview-3513961005
PR Review Comment: https://git.openjdk.org/jdk/pull/28523#discussion_r2567535924
PR Review Comment: https://git.openjdk.org/jdk/pull/28523#discussion_r2567536919
More information about the hotspot-compiler-dev
mailing list