On Thu, 15 Aug 2024 13:45:11 GMT, Yudi Zheng <yzh...@openjdk.org> wrote:
>> Axel Boldt-Christmas has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove newline > > src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 677: > >> 675: >> 676: // Check for match. >> 677: cmpptr(obj, Address(t)); > > `Address(t)` can be cached (in rax?) and reused in the subsequent `comptr` It can. Just a quick test with `LockUnlock.testInflated` µbenchmarks shows a ~5% regression when using a mov of [T] into rax and then using rax for cmp. (On my current AMD machine). But worth pursuing in a more extensive followup. I'll note this in the followup RFEs. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20067#discussion_r1718488820