Integrated: 8353058: [PPC64] Some IR framework tests are failing after JDK-8352595

Christian Hagedorn chagedorn at openjdk.org
Thu Apr 3 05:29:12 UTC 2025


On Wed, 2 Apr 2025 06:45:58 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

> `TestPhaseIRMatching` was recently updated with [JDK-8352595](https://bugs.openjdk.org/browse/JDK-8352595) which changed some matching on opto assembly from `IRNode.ALLOC` (now matching on ideal phases) to `IRNode.FIELD_ACCESS` (still matching on opto assembly). However, the updated code matches differently on PPC for some method invocation on a parameter which let the test fail on PPC:
> 
> public Object defaultOnOptoAssembly(Helper h) {
>     return h.getString(); // emits one "Field: " string on most platforms but none on PPC
> }
> 
> 
> When I've revisited the test to analyze the failure, it was not evidently clear what I had in mind back there with `defaultOnX()`. My guess is that I've tried to have one method failing on ideal phases, one on mach phases and one on both while all the methods use `IRNode` entries that have default compile phases on ideal and mach phases. But that is not the case today. I've therefore rewritten the tests to adhere to my guess. I also removed the ambiguity among platforms to have the same number of field accesses on them.
> 
> How to read the `@ExpectedFailure` annotation:
> 
>   @IR(failOn = {IRNode.STORE, IRNode.FIELD_ACCESS, IRNode.COUNTED_LOOP, IRNode.STORE_I},
>       counts = {IRNode.STORE, "20", IRNode.FIELD_ACCESS, "1", IRNode.COUNTED_LOOP, "2", IRNode.OOPMAP_WITH, "asdf", "2"})
>   // Expect rule with id 5 (the one directly above) to fail:
>   // - We fail when matching PRINT_IDEAL with the:
>   //   - failOn attribute: The failing constraints are constraint 1 and 4 (while 2 and 3 pass)
>   //   - counts attribute: The failing constraints are constraint 2 and 4 (while 1 and 3 pass).
>   @ExpectedFailure(ruleId = 5, phase = CompilePhase.PRINT_IDEAL, failOn = {1, 4}, counts = {1, 3})
> 
> 
> Thanks to @TheRealMDoerr for testing the patch on PPC!
> 
> Thanks,
> Christian

This pull request has now been integrated.

Changeset: 8d3d1d41
Author:    Christian Hagedorn <chagedorn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/8d3d1d41377cf2162aad374dce4bf7e1bcb8297c
Stats:     54 lines in 1 file changed: 17 ins; 8 del; 29 mod

8353058: [PPC64] Some IR framework tests are failing after JDK-8352595

Reviewed-by: mchevalier, thartmann

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

PR: https://git.openjdk.org/jdk/pull/24373


More information about the hotspot-compiler-dev mailing list