RFR: 8020282: Generated code quality: redundant LEAs in the chained dereferences [v2]

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Fri Jun 13 09:48:33 UTC 2025


On Thu, 12 Jun 2025 14:46:55 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

> Matching leaP* Nodes is the next best option. The main reason I went for such specific IR conditions is to show that the peephole works for all leaP* variants. If that is not valuable enough, then this would get rid of all the heap size related cruft.

Yes, I think it is worth doing this simplification. I think it is easy enough to see that, if the peephole works for one of the variants, it will work for the others.

> The most finicky tests are RegexFind and StringInflate. These could be outright removed, because they mainly show interesting behavior if all VM intrinsics are disabled. I was also not able to extract these tests into standalone tests, despite some effort.

OK, if extracting standalone tests is hard, then I would vote for going with what the PR has (except for the `leaP*` simplification). We can always simplify the test cases in the future if they prove to be difficult to maintain.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25471#discussion_r2144644956


More information about the hotspot-compiler-dev mailing list