RFR: 8372461: [IR Framework] Multiple test failures after JDK-8371789

Christian Hagedorn chagedorn at openjdk.org
Thu Nov 27 11:38:47 UTC 2025


On Thu, 27 Nov 2025 10:30:54 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> [JDK-8371789](https://bugs.openjdk.org/browse/JDK-8371789) improved the C2 type dumps but unfortunately also broke some IR Framework internal tests and some regexes:
>> 
>> - `TestIRMatching.java`: Forgot to update old reference to "precise". Replaced with "Constant".
>> - `IRNode.CHECKCAST_ARRAY*`: Forgot to update old reference to "precise". Replaced with `Constant` and added `aryklassptr`.
>> - Some clean-up to `LOAD_STORE_PREFIX` was incorrect since we no longer match various combinations tested with `TestIRMatching.java` and `TestPhaseIRMatching.java`. For example:
>> https://github.com/openjdk/jdk/blob/67ef81eb78b28e5dcdf91785b476dfd0858cbd16/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPhaseIRMatching.java#L766-L783
>> I reverted the no-longer matching part of the regex back to what we had before JDK-8371789.
>> 
>> #### Testing
>> - [X] Tier1
>> - [X] Tier5 with IR framework internal tests only
>> - [ ] Failing IR framework internal tests on all platforms
>> 
>> Thanks,
>> Christian
>
> There is following IR test failure in TestIRMatching.java:
> 
> Failed IR Rules (2) of Methods (2)
> ----------------------------------
> 1) Method "public boolean ir_framework.tests.CheckCastArray.array(java.lang.Object[])" - [Failed IR rules: 1]:
>    * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={}, failOn={"_#CHECKCAST_ARRAY#_"}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
>      > Phase "PrintOptoAssembly":
>        - failOn: Graph contains forbidden nodes:
>          * Constraint 1: "(((?i:cmp|CLFI|CLR).*aryklassptr:\[.*:Constant|.*(?i:mov|mv|or).*aryklassptr:\[.*:Constant.*\\R.*(cmp|CMP|CLR)))"
>            - Matched forbidden node:
>              * 066 +   mv  R7, narrowklass: aryklassptr:[instklassptr:ir_framework/tests/MyClass:NotNull+0 (java/lang/Cloneable,java/io/Serializable):Constant+0        # compressed klass ptr, #@loadConNKlass
>                072 +   bne  R28, R7, B5 #@cmp
> 
> 2) Method "public java.lang.Object[] ir_framework.tests.CheckCastArray.arrayCopy(java.lang.Object[],java.lang.Class)" - [Failed IR rules: 1]:
>    * @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={}, counts={}, failOn={"_#CHECKCAST_ARRAYCOPY#_"}, applyIfPlatform={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
>      > Phase "PrintOptoAssembly":
>        - failOn: Graph contains forbidden nodes:
>          * Constraint 1: "(.*((?i:call_leaf_nofp,runtime)|CALL,\\s?runtime leaf nofp|BCTRL.*.leaf call).*checkcast_arraycopy.*)"
>            - Matched forbidden node:
>              * 1b4 +   CALL, runtime leaf nofp 0x00007f88035103c0       #@CallLeafNoFPDirect checkcast_arraycopy

Thanks @Hamlin-Li for testing! Can you send me the complete `.jtr` output? It is a little tricky to understand in isolation.

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

PR Comment: https://git.openjdk.org/jdk/pull/28495#issuecomment-3585388056


More information about the hotspot-compiler-dev mailing list