[riscv-port-jdk17u:riscv-port] RFR: 8304293: RISC-V: JDK-8276799 missed atomic intrinsic support for C1
Gui Cao
gcao at openjdk.org
Tue Mar 21 02:45:04 UTC 2023
Please review this backport to riscv-port-jdk17u.
Backport of [JDK-8304293](https://bugs.openjdk.org/browse/JDK-8304293).
Let me show the IR changes before and after the modification:
`java -Xcomp -XX:TieredStopAtLevel=1 -XX:+PrintIR -version > C1.log`
before:
B3 (V) [33, 49] dom B1 pred: B1
empty stack
inlining depth 0
__bci__use__tid____instr____________________________________
33 1 a35 <instance 0x00000040c003c3b8 klass=java/util/concurrent/atomic/AtomicLong>
. 8 0 l42 a25.invokespecial(a35, l27, l4)
jdk/internal/misc/Unsafe.getAndAddLong(Ljava/lang/Object;JJ)J
41 1 a46 <instance 0x00000040c003c3c0 klass=java/util/concurrent/atomic/AtomicLong>
7 1 l53 1L
. 8 0 l54 a25.invokespecial(a46, l27, l53)
jdk/internal/misc/Unsafe.getAndAddLong(Ljava/lang/Object;JJ)J
. 49 0 i61 ireturn i29
after:
B3 (V) [33, 49] dom B1 pred: B1
empty stack
inlining depth 0
__bci__use__tid____instr____________________________________
33 1 a35 <instance 0x00000040c003c3b8 klass=java/util/concurrent/atomic/AtomicLong>
. 8 0 l42 UnsafeGetAndSetObject (add).(a35, l27, value l4)
41 1 a46 <instance 0x00000040c003c3c0 klass=java/util/concurrent/atomic/AtomicLong>
7 1 l53 1L
. 8 0 l54 UnsafeGetAndSetObject (add).(a46, l27, value l53)
. 49 0 i61 ireturn i29
Testing:
Tier1 passed without new failure on unmacthed (release).
-------------
Commit messages:
- backport 8304293: RISC-V: JDK-8276799 missed atomic intrinsic support for C1
Changes: https://git.openjdk.org/riscv-port-jdk17u/pull/19/files
Webrev: https://webrevs.openjdk.org/?repo=riscv-port-jdk17u&pr=19&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8304293
Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/riscv-port-jdk17u/pull/19.diff
Fetch: git fetch https://git.openjdk.org/riscv-port-jdk17u.git pull/19/head:pull/19
PR: https://git.openjdk.org/riscv-port-jdk17u/pull/19
More information about the riscv-port-dev
mailing list