RFR: 8020282: Generated code quality: redundant LEAs in the chained dereferences [v7]
Manuel Hässig
mhaessig at openjdk.org
Wed Jun 18 09:19:57 UTC 2025
On Tue, 17 Jun 2025 17:40:47 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
>> Manuel Hässig has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix test flags
>
> test/hotspot/jtreg/compiler/codegen/TestRedundantLea.java line 146:
>
>> 144: }
>> 145: i += 1;
>> 146: }
>
> Now that you only have one dimension, I think it is simpler to replace this loop with:
>
> scenarios[0] = new Scenario(0, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:-OptoPeephole");
> scenarios[1] = new Scenario(1, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+OptoPeephole");
Good point. Fixed in f0e64687
> test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java line 895:
>
>> 893: machOnly(LEA_P_32_NARROW, "leaP32Narrow");
>> 894: }
>> 895:
>
> This rule is unused and could be removed.
All `leaP*` rules except `LEA_P` should be unused. I simply missed simplifying one test case. I fixed this in 8197af5.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25471#discussion_r2154097596
PR Review Comment: https://git.openjdk.org/jdk/pull/25471#discussion_r2154098431
More information about the hotspot-compiler-dev
mailing list