On Mon, 8 May 2023 09:01:07 GMT, Erik Österlund <eosterl...@openjdk.org> wrote:
>> I think we use the flag `UseStoreImmI16` for these kinds of situations. > > We did indeed run into the predecoder issue when we used testw for normal > store barriers, so I changed to testl. However, this cmpw is only taken when > we use atomics. I felt less motivated to optimize every bit in this path as > the ratio of atomic accesses compared to normal stores/loads is typically > really small, when I have profiled it. That's why I haven't optimized this > path further. However, we can fix it too. It will however require some > changes to the assembler, as it currently tries to be too smart about > encoding cmpl with register + immediate operands with varying sizes. I'd like > to postpone that until after we integrate, as it seems mostly like a micro > optimization. @fisk Thanks a lot for your explanations. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13771#discussion_r1187303107