RFR: 8349361: C2: RShiftL should support all applicable transformations that RShiftI does [v12]

Emanuel Peter epeter at openjdk.org
Fri Mar 14 07:16:57 UTC 2025


On Thu, 13 Mar 2025 16:42:59 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Nice refactoring! I have a few small comments - mostly code style. Otherwise, looks good to me, too.
>
>> Nice refactoring! I have a few small comments - mostly code style. Otherwise, looks good to me, too.
> 
> Thanks for the review.
> New commit should address all your comments.
> Now that the long min/max intrinsic is integrated, I also changed the long tests so they use long min/max and that triggered a bug in the code (missing `CONST64`) that I fixed.

@rwestrel I saw this in testing from yesterday: `linux-aarch64-debug` with `-XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders`.


Failed IR Rules (2) of Methods (2)
----------------------------------
1) Method "public long compiler.c2.irTests.RShiftLNodeIdealizationTests.test8(long)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#RSHIFT_L#_", "1", "_#LSHIFT_L#_", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "PrintIdeal":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(RShiftL.*)+(\\s){2}===.*)"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!
         * Constraint 2: "(\\d+(\\s){2}(LShiftL.*)+(\\s){2}===.*)"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

2) Method "public long compiler.c2.irTests.RShiftLNodeIdealizationTests.test9(long)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={"_#RSHIFT_L#_", "1", "_#LSHIFT_L#_", "1"}, failOn={}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
     > Phase "PrintIdeal":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(RShiftL.*)+(\\s){2}===.*)"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!
         * Constraint 2: "(\\d+(\\s){2}(LShiftL.*)+(\\s){2}===.*)"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

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

PR Comment: https://git.openjdk.org/jdk/pull/23438#issuecomment-2723833440


More information about the hotspot-compiler-dev mailing list