On Tue, 11 Jun 2024 11:35:28 GMT, Shaojin Wen <d...@openjdk.org> wrote:
>> After PR https://github.com/openjdk/jdk/pull/16245, C2 optimizes stores into >> primitive arrays by combining values into larger stores. >> >> This PR rewrites the code of appendNull and append(boolean) methods so that >> these two methods can be optimized by C2. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > revert Rewriting the intrinsic to emit nodes that don't trip up the MergeStore pass seem like a reasonable thing to reach for, then. Perhaps some of these cases could be helped by a `@ForceInline` or two to get the inlining necessary to allow the JIT to eliminate all but the outer bounds checks, but that is probably too fragile in this area given how performance sensitive many of these methods are. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19626#issuecomment-2163065760