Skip to content

Conversation

@robcasloz
Copy link
Contributor

@robcasloz robcasloz commented Feb 16, 2023

This changeset extends barrier elision analysis to handle atomic (x64, riscv, aarch64) and volatile (aarch64) memory access instructions. Offset-based addressing modes are unavailable or disabled for these instructions, which defeats the regular address component analysis (finding the base and offset of an address) that is central to barrier elision analysis. The changeset extends the address component analysis with special handling to detect and extract the component information from the inputs and Ideal type of the address computation node. The proposed extension relies on the fact that AddP-matched Mach nodes contain the base address in the same input slot, as guaranteed by Matcher::ReduceInst().

The changeset also adds additional test cases that exercise analysis of atomic accesses on arrays, with the goal of testing more complex address computations, and enables the tests in aarch64. @TheRealMDoerr, @RealFYang: please let me know if you want to try out the tests on the other ZGC-supporting architectures and enable them as part of this changeset or handle that later.

Testing: tier1-7 (x64 and aaarch64; linux, windows, and macosx; release and debug mode)

Alternative solutions

Three alternative solutions were explored and discarded in favor of this one:

  • Re-enable addressing modes for x64 atomics by duplicating the ADL instruction rules (see prototype). This enables the regular address component analysis for x64 but does not improve the situation for the other architectures. Furthermore, it makes the ZGC-specific ADL code less maintainable.

  • Re-enable addressing modes for x64 atomics by introducing an ADL construct (e.g. an "operand effect") to enforce that a certain operand is always assigned a distinct register from the other operands. This has the same effect as the above alternative without affecting the readability of the ZGC-specific ADL code, but it still does not solve the issue for the other architectures.

  • Extend the address component analysis with special handling as in this changeset, but performing a local analysis of the input address computation node (see prototype). This has a similar effect as this changeset for x64 but is less effective for other architectures with simpler addressing modes such as aarch64, where address computations are sometimes performed in multiple steps.

An open question is whether the local scope of the regular address component analysis affects the effectiveness of barrier elision for regular (non-atomic, non-volatile) memory accesses in architectures with more limited addressing modes than x64.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8301769: Generational ZGC: Indirect access barriers are never elided

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/zgc pull/13/head:pull/13
$ git checkout pull/13

Update a local copy of the PR:
$ git checkout pull/13
$ git pull https://git.openjdk.org/zgc pull/13/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13

View PR using the GUI difftool:
$ git pr show -t 13

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/zgc/pull/13.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 16, 2023

👋 Welcome back rcastanedalo! A progress list of the required criteria for merging this PR into zgc_generational will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@robcasloz robcasloz marked this pull request as ready for review February 16, 2023 12:57
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 16, 2023
@mlbridge
Copy link

mlbridge bot commented Feb 16, 2023

Webrevs

Copy link
Collaborator

@fisk fisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Nice!

@openjdk
Copy link

openjdk bot commented Feb 16, 2023

@robcasloz This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8301769: Generational ZGC: Indirect access barriers are never elided

Reviewed-by: eosterlund

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 124 new commits pushed to the zgc_generational branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the zgc_generational branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 16, 2023
@TheRealMDoerr
Copy link
Contributor

TheRealMDoerr commented Feb 16, 2023

Unfortunately, we can't enable the test for PPC64, now. Parts of the optimization and the test don't work out of the box.

@robcasloz
Copy link
Contributor Author

Looks good. Nice!

Thanks for reviewing, Erik!

@robcasloz
Copy link
Contributor Author

Unfortunately, we can't enable the test for PPC64, now. Parts of the optimization and the test don't work out of the box.

Thanks for trying out the tests @TheRealMDoerr. Would you mind sharing their output here? There are two types of test cases: performance tests (unnecessary barriers are elided) and correctness tests (barriers that might be needed are preserved). While the former might fail on different platforms due to limitations in the analysis, I would like to check that none of the latter fail.

@TheRealMDoerr
Copy link
Contributor

TheRealMDoerr commented Feb 17, 2023

Compilations (7) of Failed Methods (7)
--------------------------------------
1) Compilation of "static void compiler.gcbarriers.TestZGCBarrierElision.testAllocateArrayThenStoreAtUnknownIndex(compiler.gcbarriers.Outer,int)":
> Phase "Final Code":
AFTER: FINAL_CODE
   0  Con  === 29  [[ ]]  #top
   1  Root  === 1 2 68 87  [[ 1 29 48 54 84 115 ]] inner 
   2  ShouldNotReachHere  === 3 0 0 34 0  [[ 1 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
   3  MachProj  === 4  [[ 2 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
   4  CallStaticJavaDirect  === 94 60 64 34 66 115 0 0 0 0 0 0 0 0 0 0 0 0 0 108 9 106 8 106 107 7 6  [[ 5 3 103 ]] Static wrapper for: uncommon_trap(reason='range_check' action='make_not_entrant') # void ( int ) C=0.000100 VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181) !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
   6  ConP  === 29  [[ 4 ]]  #jdk/internal/util/Preconditions$4 (java/util/function/BiFunction):exact *  Oop:jdk/internal/util/Preconditions$4 (java/util/function/BiFunction):exact *
   7  ConI  === 29  [[ 4 ]]  #int:42
   8  ConP  === 29  [[ 4 ]]  #jdk/internal/misc/Unsafe:exact *  Oop:jdk/internal/misc/Unsafe:exact *
   9  ConP  === 29  [[ 4 ]]  #java/lang/invoke/VarHandleReferences$Array (java/lang/constant/Constable):exact *  Oop:java/lang/invoke/VarHandleReferences$Array (java/lang/constant/Constable):exact *
  10  IfFalse  === 11  [[ 94 ]] #0 !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  11  rangeCheck_uimm15_iReg  === 12 112  [[ 10 75 ]] P=0.000001, C=-1.000000
  12  Proj  === 13  [[ 11 ]] #0 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:7 (line 180)
  13  Blackhole  === 14 57  [[ 12 ]]  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:7 (line 180)
  14  MachProj  === 15  [[ 13 57 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  15  membar_storestore  === 16 0 56 0 0  [[ 14 65 ]] 
  16  MachProj  === 17  [[ 15 ]] #0/unmatched
  17  Initialize  === 18 0 42 0 0 0 43  [[ 16 56 ]]  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  18  Region  === 18 96 95  [[ 18 17 43 58 60 ]]  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  19  CatchProj  === 20  [[ 116 ]] #0@bci -1  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  20  Catch  === 21 40  [[ 19 88 ]]  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  21  MachProj  === 22  [[ 20 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  22  CallStaticJavaDirect  === 98 0 32 34 0 123 111 108 109 0  [[ 23 21 40 44 59 102 ]] Static wrapper for: _new_array_Java # rawptr:NotNull ( java/lang/Object:NotNull *, int ) C=0.000100 TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179) !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  24  IfFalse  === 25  [[ 98 ]] #0
  25  branchCon  === 28 26  [[ 41 24 ]] P=0.000100, C=-1.000000
  26  cmpP_reg_reg  === _ 30 27  [[ 25 ]] 
  27  loadP  === 28 32 33  [[ 26 ]] rawptr:BotPTR
  28  MachProj  === 29  [[ 25 31 27 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  29  Start  === 29 1  [[ 29 28 32 34 38 39 61 66 0 110 111 33 9 8 7 6 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address, 5:compiler/gcbarriers/Outer *, 6:int} !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  30  addP_reg_imm16  === _ 0 31  [[ 26 55 63 ]] rawptr:BotPTR
  31  loadP  === 28 32 33  [[ 30 53 51 50 46 46 58 63 ]] rawptr:BotPTR
  32  MachProj  === 29  [[ 31 27 22 55 42 64 76 89 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  33  tlsLoadP  === 29  [[ 31 27 55 ]] 
  34  MachProj  === 29  [[ 22 4 2 68 87 ]] #3 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  38  MachProj  === 29  [[ 108 ]] #5  Oop:compiler/gcbarriers/Outer * !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  39  MachProj  === 29  [[ 109 ]] #6 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  40  MachProj  === 22  [[ 20 87 90 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  41  IfTrue  === 25  [[ 99 ]] #1
  42  MergeMem  === _ 0 43 0 0 0 32  [[ 17 ]]  { - - - N32:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  43  Phi  === 18 44 45  [[ 42 17 ]]  #memory  Memory: @rawptr:BotPTR, idx=Raw;
  44  MachProj  === 22  [[ 43 89 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  45  inlineCallClearArrayLarge  === 99 50 46 48  [[ 47 49 43 ]] #42/0x000000000000002a
  46  addP_reg_imm16  === _ 31 31  [[ 45 ]] rawptr:BotPTR
  48  MachTemp  === 1  [[ 45 ]] 
  50  storeI  === 99 51 31 110  [[ 45 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  51  storeNKlass  === 99 53 31 119  [[ 50 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  53  storeL  === 99 55 31 54  [[ 51 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  54  loadConL16  === 1  [[ 53 ]] #1/0x0000000000000001
  55  storeP  === 99 32 33 30  [[ 53 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  56  MachProj  === 17  [[ 15 ]] #2/unmatched  Memory: @rawptr:BotPTR, idx=Raw;
  57  checkCastPP  === 14 58  [[ 13 106 81 81 ]] compiler/gcbarriers/Outer *[int:42] (java/lang/Cloneable,java/io/Serializable):NotNull:exact * !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  58  Phi  === 18 59 31  [[ 57 ]]  #rawptr:BotPTR !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  59  MachProj  === 22  [[ 58 ]] #5 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  60  Phi  === 18 61 62  [[ 4 68 ]]  #abIO
  61  MachProj  === 29  [[ 60 62 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  62  prefetch_alloc_no_offset  === 99 61 63  [[ 60 ]] 
  63  addP_reg_imm16  === _ 31 30  [[ 62 ]] rawptr:BotPTR
  64  MergeMem  === _ 0 32 65 65 65 65  [[ 4 ]]  { N65:rawptr:BotPTR N65:java/lang/Object * N65:java/lang/Object+8 * [narrowklass] N65:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  65  MachProj  === 15  [[ 64 64 64 64 76 76 76 76 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  66  MachProj  === 29  [[ 4 68 87 ]] #4 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  68  Ret  === 69 60 86 34 66  [[ 1 ]] 
  69  MachProj  === 70  [[ 68 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  70  MemBarCPUOrder  === 71 0 78 0 0  [[ 69 86 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  71  MachProj  === 72  [[ 70 80 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  72  MemBarCPUOrder  === 73 0 77 0 0  [[ 71 79 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  73  MachProj  === 74  [[ 72 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  74  membar_release  === 100 0 76 0 0  [[ 73 77 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  75  IfTrue  === 11  [[ 100 ]] #1 !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  76  MergeMem  === _ 0 32 65 65 65 65  [[ 74 ]]  { N65:rawptr:BotPTR N65:java/lang/Object * N65:java/lang/Object+8 * [narrowklass] N65:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:54 (line 613) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  77  MachProj  === 74  [[ 72 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  78  MergeMem  === _ 0 79 0 0 0 80  [[ 70 ]]  { - - - N80:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  79  MachProj  === 72  [[ 78 80 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  80  zStoreP  === 71 79 81 113 84  [[ 85 78 ]] memory barrier(strong )  Memory: @compiler/gcbarriers/Outer *[int:42] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=6; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  81  addP_reg_reg  === _ 57 57 82  [[ 80 ]] compiler/gcbarriers/Outer *[int:42] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *
  82  scaledPositiveI2L_lShiftL_convI2L_reg_imm6  === _ 83  [[ 81 ]] #3/0x00000003
  83  castII  === 100 112  [[ 82 ]] int:>=0:www
  84  MachTemp  === 1  [[ 80 ]] 
  86  MachProj  === 70  [[ 68 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  87  RethrowException  === 101 40 89 34 66 90  [[ 1 ]] 
  88  CatchProj  === 20  [[ 101 ]] #1@bci -1  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  89  MergeMem  === _ 0 32 44  [[ 87 ]]  { N44:rawptr:BotPTR }  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  90  CreateException  === 101 40  [[ 87 ]] java/lang/Throwable (java/io/Serializable):NotNull *  Oop:java/lang/Throwable (java/io/Serializable):NotNull * !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  94  Region  === 94 10  [[ 94 4 ]] 
  95  branch  === 99  [[ 18 ]]  !orig=93
  96  branch  === 97  [[ 18 ]]  !orig=93
  97  Region  === 97 117  [[ 97 96 ]] 
  98  Region  === 98 24  [[ 98 22 ]] 
  99  Region  === 99 41  [[ 99 95 62 45 50 51 53 55 ]] 
 100  Region  === 100 75  [[ 100 74 83 ]] 
 101  Region  === 101 88  [[ 101 87 90 ]] 
 106  DebugUseSpillCopy  === _ 57  [[ 4 4 ]] 
 107  DebugUseSpillCopy  === _ 112  [[ 4 ]] 
 108  DefinitionSpillCopy  === _ 38  [[ 22 113 4 ]]   Oop:compiler/gcbarriers/Outer *
 109  DefinitionSpillCopy  === _ 39  [[ 22 112 ]] 
 110  loadConI16  === 29  [[ 50 ]] #42/0x0000002a
 111  loadConI16  === 29  [[ 22 ]] #42/0x0000002a
 112  MemToRegSpillCopy  === _ 109  [[ 11 83 107 ]] 
 113  MemToRegSpillCopy  === _ 108  [[ 80 ]]   Oop:compiler/gcbarriers/Outer *
 115  loadConI16  === 1  [[ 4 ]] #-28/0xffffffe4
 116  Region  === 116 19  [[ 116 117 ]] 
 117  branch  === 116  [[ 97 ]]  !orig=93
 118  loadConNKlass_hi  === _  [[ 119 ]]   [288000118]
 119  loadConNKlass_lo  === _ 118  [[ 51 ]] narrowklass: precise [compiler/gcbarriers/Outer: 0x00007ffb080843e8 * (java/lang/Cloneable,java/io/Serializable): :Constant:exact *
 120  loadToc_hi  === _  [[ 121 ]]   [288000120]
 121  loadToc_lo  === _ 120  [[ 122 ]] 
 122  loadConP_hi  === _ 121  [[ 123 ]] precise [compiler/gcbarriers/Outer: 0x00007ffb080843e8 * (java/lang/Cloneable,java/io/Serializable): :Constant:exact *
 123  loadConP_lo  === _ 122  [[ 22 ]] precise [compiler/gcbarriers/Outer: 0x00007ffb080843e8 * (java/lang/Cloneable,java/io/Serializable): :Constant:exact *

2) Compilation of "static void compiler.gcbarriers.TestZGCBarrierElision.testAllocateThenLoad()":
> Phase "Final Code":
AFTER: FINAL_CODE
   0  Con  === 32  [[ ]]  #top
   1  Root  === 1 2 76  [[ 1 32 49 63 68 53 ]] inner 
   2  Ret  === 3 70 74 37 75  [[ 1 ]] 
   3  Proj  === 4  [[ 2 ]] #0 !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:23 (line 92)
   4  Blackhole  === 5 67  [[ 3 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:23 (line 92)
   5  MachProj  === 6  [[ 4 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:20 (line 92)
   6  unnecessary_membar_acquire  === 7 0 66 0 0  |67 0  [[ 5 74 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:20 (line 92)
   7  MachProj  === 8  [[ 6 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:20 (line 92)
   8  membar_volatile  === 9 0 65 0 0  [[ 7 66 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:20 (line 92)
   9  Proj  === 10  [[ 8 ]] #0 !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:16 (line 91)
  10  Blackhole  === 11 62  [[ 9 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:16 (line 91)
  11  MachProj  === 12  [[ 10 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:13 (line 91)
  12  unnecessary_membar_acquire  === 13 0 61 0 0  |62 0  [[ 11 65 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:13 (line 91)
  13  MachProj  === 14  [[ 12 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:13 (line 91)
  14  membar_volatile  === 15 0 59 0 0  [[ 13 61 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:13 (line 91)
  15  Proj  === 16  [[ 14 ]] #0 !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:9 (line 89)
  16  Blackhole  === 17 56  [[ 15 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:9 (line 89)
  17  MachProj  === 18  [[ 16 56 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  18  membar_storestore  === 19 0 55 0 0  [[ 17 60 ]] 
  19  MachProj  === 20  [[ 18 ]] #0/unmatched
  20  Initialize  === 21 0 42 0 0 0 43  [[ 19 55 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  21  Region  === 21 84 83  [[ 21 20 43 57 70 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  22  CatchProj  === 23  [[ 90 ]] #0@bci -1  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  23  Catch  === 24 40  [[ 22 77 ]]  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  24  MachProj  === 25  [[ 23 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  25  CallStaticJavaDirect  === 86 0 35 37 0 97 0  [[ 26 24 40 44 58 89 ]] Static wrapper for: _new_instance_Java # rawptr:NotNull ( java/lang/Object:NotNull * ) C=0.000100 TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88) !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  27  IfFalse  === 28  [[ 86 ]] #0
  28  branchCon  === 31 29  [[ 41 27 ]] P=0.000100, C=-1.000000
  29  cmpP_reg_reg  === _ 33 30  [[ 28 ]] 
  30  loadP  === 31 35 36  [[ 29 ]] rawptr:BotPTR
  31  MachProj  === 32  [[ 28 34 30 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:-1 (line 88)
  32  Start  === 32 1  [[ 32 31 35 37 71 75 0 46 36 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address} !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:23 (line 92)
  33  addP_reg_imm16  === _ 0 34  [[ 29 54 73 ]] rawptr:BotPTR
  34  loadP  === 31 35 36  [[ 33 52 50 48 47 45 57 73 ]] rawptr:BotPTR
  35  MachProj  === 32  [[ 34 30 25 54 42 42 59 78 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:-1 (line 88)
  36  tlsLoadP  === 32  [[ 34 30 54 ]] 
  37  MachProj  === 32  [[ 25 2 76 ]] #3 !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:-1 (line 88)
  40  MachProj  === 25  [[ 23 76 79 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  41  IfTrue  === 28  [[ 87 ]] #1
  42  MergeMem  === _ 0 43 0 0 0 35 35  [[ 20 ]]  { - - - N35:compiler/gcbarriers/Outer+16 * N35:compiler/gcbarriers/Outer+24 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  43  Phi  === 21 44 45  [[ 42 20 ]]  #memory  Memory: @rawptr:BotPTR, idx=Raw;
  44  MachProj  === 25  [[ 43 78 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  45  storeL  === 87 47 34 46  [[ 43 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  46  loadConL32hi16  === 32  [[ 47 45 ]] #0/0x0000000000000000
  47  storeL  === 87 48 34 46  [[ 45 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  48  storeI  === 87 50 34 49  [[ 47 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  49  loadConI16  === 1  [[ 48 ]] #0/0x00000000
  50  storeNKlass  === 87 52 34 93  [[ 48 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  52  storeL  === 87 54 34 53  [[ 50 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  53  loadConL16  === 1  [[ 52 ]] #1/0x0000000000000001
  54  storeP  === 87 35 36 33  [[ 52 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  55  MachProj  === 20  [[ 18 ]] #2/unmatched  Memory: @rawptr:BotPTR, idx=Raw;
  56  checkCastPP  === 17 57  [[ 16 62 67 ]] compiler/gcbarriers/Outer:NotNull:exact *  Oop:compiler/gcbarriers/Outer:NotNull:exact * !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  57  Phi  === 21 58 34  [[ 56 ]]  #rawptr:BotPTR !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  58  MachProj  === 25  [[ 57 ]] #5 !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  59  MergeMem  === _ 0 35 60 60 60 60 60  [[ 14 ]]  { N60:rawptr:BotPTR N60:java/lang/Object * N60:java/lang/Object+8 * [narrowklass] N60:compiler/gcbarriers/Outer+16 * N60:compiler/gcbarriers/Outer+24 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:4 (line 88)
  60  MachProj  === 18  [[ 59 59 59 59 59 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  61  MachProj  === 14  [[ 12 62 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:13 (line 91)
  62  zLoadP_acq  === _ 61 56 63  [[ 64 10 12 ]] compiler/gcbarriers/Inner * barrier(elided )  Oop:compiler/gcbarriers/Inner * !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:13 (line 91)
  63  MachTemp  === 1  [[ 62 ]] 
  65  MachProj  === 12  [[ 8 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:13 (line 91)
  66  MachProj  === 8  [[ 6 67 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:20 (line 92)
  67  zLoadP_acq  === _ 66 56 68  [[ 69 4 6 ]] compiler/gcbarriers/Inner * barrier(elided )  Oop:compiler/gcbarriers/Inner * !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:20 (line 92)
  68  MachTemp  === 1  [[ 67 ]] 
  70  Phi  === 21 71 72  [[ 2 ]]  #abIO
  71  MachProj  === 32  [[ 70 72 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:-1 (line 88)
  72  prefetch_alloc_no_offset  === 87 71 73  [[ 70 ]] 
  73  addP_reg_imm16  === _ 34 33  [[ 72 ]] rawptr:BotPTR
  74  MachProj  === 6  [[ 2 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:20 (line 92)
  75  MachProj  === 32  [[ 2 76 ]] #4 !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:-1 (line 88)
  76  RethrowException  === 88 40 78 37 75 79  [[ 1 ]] 
  77  CatchProj  === 23  [[ 88 ]] #1@bci -1  !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  78  MergeMem  === _ 0 35 44  [[ 76 ]]  { N44:rawptr:BotPTR }  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  79  CreateException  === 88 40  [[ 76 ]] java/lang/Throwable (java/io/Serializable):NotNull *  Oop:java/lang/Throwable (java/io/Serializable):NotNull * !jvms: TestZGCBarrierElision::testAllocateThenLoad @ bci:0 (line 88)
  83  branch  === 87  [[ 21 ]]  !orig=82
  84  branch  === 85  [[ 21 ]]  !orig=82
  85  Region  === 85 91  [[ 85 84 ]] 
  86  Region  === 86 27  [[ 86 25 ]] 
  87  Region  === 87 41  [[ 87 83 72 45 47 48 50 52 54 ]] 
  88  Region  === 88 77  [[ 88 76 79 ]] 
  90  Region  === 90 22  [[ 90 91 ]] 
  91  branch  === 90  [[ 85 ]]  !orig=82
  92  loadConNKlass_hi  === _  [[ 93 ]]   [565300092]
  93  loadConNKlass_lo  === _ 92  [[ 50 ]] narrowklass: precise compiler/gcbarriers/Outer: 0x00007ffb0827d198:Constant:exact *
  94  loadToc_hi  === _  [[ 95 ]]   [565300094]
  95  loadToc_lo  === _ 94  [[ 96 ]] 
  96  loadConP_hi  === _ 95  [[ 97 ]] precise compiler/gcbarriers/Outer: 0x00007ffb0827d198:Constant:exact *
  97  loadConP_lo  === _ 96  [[ 25 ]] precise compiler/gcbarriers/Outer: 0x00007ffb0827d198:Constant:exact *  Klass:precise compiler/gcbarriers/Outer: 0x00007ffb0827d198:Constant:exact *

3) Compilation of "static void compiler.gcbarriers.TestZGCBarrierElision.testArrayAtomicThenAtomic(compiler.gcbarriers.Outer[],compiler.gcbarriers.Outer)":
> Phase "Final Code":
AFTER: FINAL_CODE
  0  Con  === 10  [[ ]]  #top
  1  Root  === 1 2 17 32  [[ 1 10 16 88 68 67 57 56 ]] inner 
  2  ShouldNotReachHere  === 3 0 0 14 0  [[ 1 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:28 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
  3  MachProj  === 4  [[ 2 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:28 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
  4  CallStaticJavaDirect  === 75 12 13 14 15 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6  [[ 5 3 81 ]] Static wrapper for: uncommon_trap(reason='speculate_null_check' action='maybe_recompile') # void ( int ) C=0.000100 VarHandleReferences$Array::getAndSet @ bci:28 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363) !jvms: VarHandleReferences$Array::getAndSet @ bci:28 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
  6  ConP  === 10  [[ 4 ]]  #NULL
  7  IfFalse  === 79  [[ 77 ]] #0 !jvms: VarHandleReferences$Array::getAndSet @ bci:28 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
  9  MachProj  === 10  [[ 79 29 ]] #0/unmatched !jvms: TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:-1 (line 363)
 10  Start  === 10 1  [[ 10 9 11 12 13 14 15 31 0 24 23 22 21 6 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address, 5:compiler/gcbarriers/Outer *[int:>=0] (java/lang/Cloneable,java/io/Serializable) *, 6:compiler/gcbarriers/Outer *} !jvms: VarHandleReferences$Array::getAndSet @ bci:28 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 11  MachProj  === 10  [[ 66 29 86 85 66 55 55 ]] #5 !jvms: TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:-1 (line 363)
 12  MachProj  === 10  [[ 4 19 32 ]] #1/unmatched !jvms: TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:-1 (line 363)
 13  MachProj  === 10  [[ 4 29 19 48 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:-1 (line 363)
 14  MachProj  === 10  [[ 4 2 19 17 32 ]] #3 !jvms: TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:-1 (line 363)
 15  MachProj  === 10  [[ 4 19 32 ]] #4 !jvms: TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:-1 (line 363)
 16  loadConI16  === 1  [[ 4 ]] #-162/0xffffff5e
 17  ShouldNotReachHere  === 18 0 0 14 0  [[ 1 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:32 (line 735) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 18  MachProj  === 19  [[ 17 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:32 (line 735) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 19  CallStaticJavaDirect  === 76 12 13 14 15 88 85 84 0 0 0 0 0 0 0 0 0 0 84 24 86 23 85 22 87 21  [[ 20 18 80 ]] Static wrapper for: uncommon_trap(reason='range_check' action='make_not_entrant') # void ( int ) C=0.000100 VarHandleReferences$Array::getAndSet @ bci:32 (line 735) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363) !jvms: VarHandleReferences$Array::getAndSet @ bci:32 (line 735) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 21  ConP  === 10  [[ 19 ]]  #jdk/internal/util/Preconditions$4 (java/util/function/BiFunction):exact *  Oop:jdk/internal/util/Preconditions$4 (java/util/function/BiFunction):exact *
 22  ConI  === 10  [[ 19 ]]  #int:0
 23  ConP  === 10  [[ 19 ]]  #jdk/internal/misc/Unsafe:exact *  Oop:jdk/internal/misc/Unsafe:exact *
 24  ConP  === 10  [[ 19 ]]  #java/lang/invoke/VarHandleReferences$Array (java/lang/constant/Constable):exact *  Oop:java/lang/invoke/VarHandleReferences$Array (java/lang/constant/Constable):exact *
 25  IfTrue  === 26  [[ 76 ]] #1 !jvms: VarHandleReferences$Array::getAndSet @ bci:32 (line 735) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 26  branchCon  === 77 27  [[ 49 25 ]] P=0.000001, C=-1.000000
 27  compU_reg_uimm16  === _ 29  [[ 26 ]] #0/0x00000000
 28  IfTrue  === 79  [[ 75 ]] #1 !jvms: VarHandleReferences$Array::getAndSet @ bci:28 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 29  loadRange  === 9 13 11  [[ 27 87 79 ]] #12/0x000000000000000c !jvms: VarHandleReferences$Array::getAndSet @ bci:28 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 31  MachProj  === 10  [[ 84 65 54 ]] #6  Oop:compiler/gcbarriers/Outer * !jvms: TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:-1 (line 363)
 32  Ret  === 33 12 71 14 15  [[ 1 ]] 
 33  MachProj  === 34  [[ 32 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 34  unnecessary_membar_acquire  === 35 0 70 0 0  |65  [[ 33 71 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 35  MachProj  === 36  [[ 34 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 36  MemBarCPUOrder  === 37 0 62 0 0  [[ 35 70 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 37  MachProj  === 38  [[ 36 65 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 38  MemBarCPUOrder  === 39 0 61 0 0  [[ 37 63 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 39  MachProj  === 40  [[ 38 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 40  membar_volatile  === 41 0 60 0 0  [[ 39 61 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 41  MachProj  === 42  [[ 40 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 42  unnecessary_membar_acquire  === 43 0 59 0 0  |54  [[ 41 60 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 43  MachProj  === 44  [[ 42 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 44  MemBarCPUOrder  === 45 0 51 0 0  [[ 43 59 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 45  MachProj  === 46  [[ 44 54 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 46  MemBarCPUOrder  === 47 0 50 0 0  [[ 45 52 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 47  MachProj  === 48  [[ 46 ]] #0/unmatched !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 48  membar_volatile  === 78 0 13 0 0  [[ 47 50 ]]  !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 49  IfFalse  === 26  [[ 78 ]] #0 !jvms: VarHandleReferences$Array::getAndSet @ bci:32 (line 735) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 50  MachProj  === 48  [[ 46 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 51  MergeMem  === _ 0 52 0 53  [[ 44 ]]  { - N53:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 52  MachProj  === 46  [[ 51 54 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 53  SCMemProj  === 54  [[ 51 ]]   Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 54  zGetAndSetP  === 45 52 55 31 56 57  [[ 58 53 42 ]] compiler/gcbarriers/Outer * barrier(strong )  Oop:compiler/gcbarriers/Outer * !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 55  addP_reg_imm16  === _ 11 11  [[ 54 ]] compiler/gcbarriers/Outer *[int:>=0] (java/lang/Cloneable,java/io/Serializable)[0] *
 56  MachTemp  === 1  [[ 54 ]] 
 57  MachTemp  === 1  [[ 54 ]] 
 59  MachProj  === 44  [[ 42 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 60  MachProj  === 42  [[ 40 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:6 (line 363)
 61  MachProj  === 40  [[ 38 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 62  MergeMem  === _ 0 63 0 64  [[ 36 ]]  { - N64:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 63  MachProj  === 38  [[ 62 65 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 64  SCMemProj  === 65  [[ 62 ]]   Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 65  zGetAndSetP  === 37 63 66 31 67 68  [[ 69 64 34 ]] compiler/gcbarriers/Outer * barrier(strong )  Oop:compiler/gcbarriers/Outer * !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 66  addP_reg_imm16  === _ 11 11  [[ 65 ]] compiler/gcbarriers/Outer *[int:>=0] (java/lang/Cloneable,java/io/Serializable)[0] *
 67  MachTemp  === 1  [[ 65 ]] 
 68  MachTemp  === 1  [[ 65 ]] 
 70  MachProj  === 36  [[ 34 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 71  MachProj  === 34  [[ 32 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::getAndSet @ bci:57 (line 734) VarHandleGuards::guard_LIL_V @ bci:97 (line 703) TestZGCBarrierElision::testArrayAtomicThenAtomic @ bci:15 (line 364)
 75  Region  === 75 28  [[ 75 4 ]] 
 76  Region  === 76 25  [[ 76 19 ]] 
 77  Region  === 77 7  [[ 77 26 ]] 
 78  Region  === 78 49  [[ 78 48 ]] 
 79  NullCheck  === 9 29  [[ 28 7 ]] 
 84  DebugUseSpillCopy  === _ 31  [[ 19 19 ]]   Oop:compiler/gcbarriers/Outer *
 85  DebugUseSpillCopy  === _ 11  [[ 19 19 ]] 
 86  DebugUseSpillCopy  === _ 11  [[ 19 ]] 
 87  DebugUseSpillCopy  === _ 29  [[ 19 ]] 
 88  loadConI16  === 1  [[ 19 ]] #-28/0xffffffe4

4) Compilation of "static void compiler.gcbarriers.TestZGCBarrierElision.testAtomicThenAtomic(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)":
> Phase "Final Code":
AFTER: FINAL_CODE
  0  Con  === 13  [[ ]]  #top
  1  Root  === 1 2 21  [[ 1 13 70 57 56 46 45 ]] inner 
  2  ShouldNotReachHere  === 3 0 0 17 0  [[ 1 ]]  !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
  3  MachProj  === 4  [[ 2 ]] #0/unmatched !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
  4  CallStaticJavaDirect  === 64 15 16 17 18 70 67 69 0 0 0 0 0 0 0 0 69 9 8 7 6  [[ 5 3 66 ]] Static wrapper for: uncommon_trap(reason='speculate_null_check' action='make_not_entrant') # void ( int ) C=0.000100 Objects::requireNonNull @ bci:1 (line 232) reexecute VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332) !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
  6  ConP  === 13  [[ 4 ]]  #NULL
  7  ConP  === 13  [[ 4 ]]  #NULL
  8  ConP  === 13  [[ 4 ]]  #jdk/internal/misc/Unsafe:exact *  Oop:jdk/internal/misc/Unsafe:exact *
  9  ConP  === 13  [[ 4 ]]  #java/lang/invoke/VarHandleReferences$FieldInstanceReadWrite (java/lang/constant/Constable):exact *  Oop:java/lang/invoke/VarHandleReferences$FieldInstanceReadWrite (java/lang/constant/Constable):exact *
 10  IfFalse  === 11  [[ 64 ]] #0 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 11  zeroCheckP_reg_imm0  === 12 14  [[ 10 38 ]] P=0.000001, C=-1.000000 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 12  MachProj  === 13  [[ 11 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAtomicThenAtomic @ bci:-1 (line 332)
 13  Start  === 13 1  [[ 13 12 14 15 16 17 18 20 0 9 8 7 6 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address, 5:compiler/gcbarriers/Outer *, 6:compiler/gcbarriers/Inner *} !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 14  MachProj  === 13  [[ 11 67 44 44 55 55 ]] #5  Oop:compiler/gcbarriers/Outer * !jvms: TestZGCBarrierElision::testAtomicThenAtomic @ bci:-1 (line 332)
 15  MachProj  === 13  [[ 4 21 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAtomicThenAtomic @ bci:-1 (line 332)
 16  MachProj  === 13  [[ 4 37 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAtomicThenAtomic @ bci:-1 (line 332)
 17  MachProj  === 13  [[ 4 2 21 ]] #3 !jvms: TestZGCBarrierElision::testAtomicThenAtomic @ bci:-1 (line 332)
 18  MachProj  === 13  [[ 4 21 ]] #4 !jvms: TestZGCBarrierElision::testAtomicThenAtomic @ bci:-1 (line 332)
 20  MachProj  === 13  [[ 69 54 43 ]] #6  Oop:compiler/gcbarriers/Inner * !jvms: TestZGCBarrierElision::testAtomicThenAtomic @ bci:-1 (line 332)
 21  Ret  === 22 15 60 17 18  [[ 1 ]] 
 22  MachProj  === 23  [[ 21 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 23  unnecessary_membar_acquire  === 24 0 59 0 0  |54  [[ 22 60 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 24  MachProj  === 25  [[ 23 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 25  MemBarCPUOrder  === 26 0 51 0 0  [[ 24 59 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 26  MachProj  === 27  [[ 25 54 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 27  MemBarCPUOrder  === 28 0 50 0 0  [[ 26 52 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 28  MachProj  === 29  [[ 27 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 29  membar_volatile  === 30 0 49 0 0  [[ 28 50 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 30  MachProj  === 31  [[ 29 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 31  unnecessary_membar_acquire  === 32 0 48 0 0  |43  [[ 30 49 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 32  MachProj  === 33  [[ 31 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 33  MemBarCPUOrder  === 34 0 40 0 0  [[ 32 48 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 34  MachProj  === 35  [[ 33 43 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 35  MemBarCPUOrder  === 36 0 39 0 0  [[ 34 41 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 36  MachProj  === 37  [[ 35 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 37  membar_volatile  === 65 0 16 0 0  [[ 36 39 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 38  IfTrue  === 11  [[ 65 ]] #1 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 39  MachProj  === 37  [[ 35 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 40  MergeMem  === _ 0 41 0 0 42  [[ 33 ]]  { - - N42:compiler/gcbarriers/Outer+16 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 41  MachProj  === 35  [[ 40 43 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 42  SCMemProj  === 43  [[ 40 ]]   Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 43  zGetAndSetP  === 34 41 44 20 45 46  [[ 47 42 31 ]] compiler/gcbarriers/Inner * barrier(strong )  Oop:compiler/gcbarriers/Inner * !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 44  addP_reg_imm16  === _ 14 14  [[ 43 ]] compiler/gcbarriers/Outer+16 *  Oop:compiler/gcbarriers/Outer+16 *
 45  MachTemp  === 1  [[ 43 ]] 
 46  MachTemp  === 1  [[ 43 ]] 
 48  MachProj  === 33  [[ 31 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 49  MachProj  === 31  [[ 29 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:5 (line 332)
 50  MachProj  === 29  [[ 27 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 51  MergeMem  === _ 0 52 0 0 53  [[ 25 ]]  { - - N53:compiler/gcbarriers/Outer+16 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 52  MachProj  === 27  [[ 51 54 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 53  SCMemProj  === 54  [[ 51 ]]   Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 54  zGetAndSetP  === 26 52 55 20 56 57  [[ 58 53 23 ]] compiler/gcbarriers/Inner * barrier(strong )  Oop:compiler/gcbarriers/Inner * !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 55  addP_reg_imm16  === _ 14 14  [[ 54 ]] compiler/gcbarriers/Outer+16 *  Oop:compiler/gcbarriers/Outer+16 *
 56  MachTemp  === 1  [[ 54 ]] 
 57  MachTemp  === 1  [[ 54 ]] 
 59  MachProj  === 25  [[ 23 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 60  MachProj  === 23  [[ 21 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenAtomic @ bci:13 (line 333)
 64  Region  === 64 10  [[ 64 4 ]] 
 65  Region  === 65 38  [[ 65 37 ]] 
 67  DebugUseSpillCopy  === _ 14  [[ 4 ]]   Oop:compiler/gcbarriers/Outer *
 69  DebugUseSpillCopy  === _ 20  [[ 4 4 ]]   Oop:compiler/gcbarriers/Inner *
 70  loadConI16  === 1  [[ 4 ]] #-164/0xffffff5c

5) Compilation of "static void compiler.gcbarriers.TestZGCBarrierElision.testAtomicThenLoad(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)":
> Phase "Final Code":
AFTER: FINAL_CODE
  0  Con  === 13  [[ ]]  #top
  1  Root  === 1 2 21  [[ 1 13 61 50 44 43 ]] inner 
  2  ShouldNotReachHere  === 3 0 0 17 0  [[ 1 ]]  !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
  3  MachProj  === 4  [[ 2 ]] #0/unmatched !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
  4  CallStaticJavaDirect  === 56 15 16 17 18 61 59 0 0 0 0 0 0 0 0 0 60 9 8 7 6  [[ 5 3 58 ]] Static wrapper for: uncommon_trap(reason='speculate_null_check' action='make_not_entrant') # void ( int ) C=0.000100 Objects::requireNonNull @ bci:1 (line 232) reexecute VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316) !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
  6  ConP  === 13  [[ 4 ]]  #NULL
  7  ConP  === 13  [[ 4 ]]  #NULL
  8  ConP  === 13  [[ 4 ]]  #jdk/internal/misc/Unsafe:exact *  Oop:jdk/internal/misc/Unsafe:exact *
  9  ConP  === 13  [[ 4 ]]  #java/lang/invoke/VarHandleReferences$FieldInstanceReadWrite (java/lang/constant/Constable):exact *  Oop:java/lang/invoke/VarHandleReferences$FieldInstanceReadWrite (java/lang/constant/Constable):exact *
 10  IfFalse  === 11  [[ 56 ]] #0 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 11  zeroCheckP_reg_imm0  === 12 14  [[ 10 36 ]] P=0.000001, C=-1.000000 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 12  MachProj  === 13  [[ 11 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:-1 (line 316)
 13  Start  === 13 1  [[ 13 12 14 15 16 17 18 20 0 9 8 7 6 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address, 5:compiler/gcbarriers/Outer *, 6:compiler/gcbarriers/Inner *} !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 14  MachProj  === 13  [[ 11 59 42 42 49 ]] #5  Oop:compiler/gcbarriers/Outer * !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:-1 (line 316)
 15  MachProj  === 13  [[ 4 21 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:-1 (line 316)
 16  MachProj  === 13  [[ 4 35 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:-1 (line 316)
 17  MachProj  === 13  [[ 4 2 21 ]] #3 !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:-1 (line 316)
 18  MachProj  === 13  [[ 4 21 ]] #4 !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:-1 (line 316)
 20  MachProj  === 13  [[ 60 41 ]] #6  Oop:compiler/gcbarriers/Inner * !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:-1 (line 316)
 21  Ret  === 22 15 52 17 18  [[ 1 ]] 
 22  Proj  === 23  [[ 21 ]] #0 !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:12 (line 317)
 23  Blackhole  === 24 49  [[ 22 ]]  !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:12 (line 317)
 24  MachProj  === 25  [[ 23 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:9 (line 317)
 25  unnecessary_membar_acquire  === 26 0 48 0 0  |49 0  [[ 24 52 ]]  !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:9 (line 317)
 26  MachProj  === 27  [[ 25 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:9 (line 317)
 27  membar_volatile  === 28 0 47 0 0  [[ 26 48 ]]  !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:9 (line 317)
 28  MachProj  === 29  [[ 27 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 29  unnecessary_membar_acquire  === 30 0 46 0 0  |41  [[ 28 47 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 30  MachProj  === 31  [[ 29 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 31  MemBarCPUOrder  === 32 0 38 0 0  [[ 30 46 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 32  MachProj  === 33  [[ 31 41 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 33  MemBarCPUOrder  === 34 0 37 0 0  [[ 32 39 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 34  MachProj  === 35  [[ 33 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 35  membar_volatile  === 57 0 16 0 0  [[ 34 37 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 36  IfTrue  === 11  [[ 57 ]] #1 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 37  MachProj  === 35  [[ 33 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 38  MergeMem  === _ 0 39 0 0 40  [[ 31 ]]  { - - N40:compiler/gcbarriers/Outer+16 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 39  MachProj  === 33  [[ 38 41 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 40  SCMemProj  === 41  [[ 38 ]]   Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 41  zGetAndSetP  === 32 39 42 20 43 44  [[ 45 40 29 ]] compiler/gcbarriers/Inner * barrier(strong )  Oop:compiler/gcbarriers/Inner * !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 42  addP_reg_imm16  === _ 14 14  [[ 41 ]] compiler/gcbarriers/Outer+16 *  Oop:compiler/gcbarriers/Outer+16 *
 43  MachTemp  === 1  [[ 41 ]] 
 44  MachTemp  === 1  [[ 41 ]] 
 46  MachProj  === 31  [[ 29 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 47  MachProj  === 29  [[ 27 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenLoad @ bci:5 (line 316)
 48  MachProj  === 27  [[ 25 49 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:9 (line 317)
 49  zLoadP_acq  === 57 48 14 50  [[ 51 23 25 ]] compiler/gcbarriers/Inner * barrier(strong )  Oop:compiler/gcbarriers/Inner * !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:9 (line 317)
 50  MachTemp  === 1  [[ 49 ]] 
 52  MachProj  === 25  [[ 21 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAtomicThenLoad @ bci:9 (line 317)
 56  Region  === 56 10  [[ 56 4 ]] 
 57  Region  === 57 36  [[ 57 35 49 ]] 
 59  DebugUseSpillCopy  === _ 14  [[ 4 ]]   Oop:compiler/gcbarriers/Outer *
 60  DebugUseSpillCopy  === _ 20  [[ 4 ]]   Oop:compiler/gcbarriers/Inner *
 61  loadConI16  === 1  [[ 4 ]] #-164/0xffffff5c

6) Compilation of "static void compiler.gcbarriers.TestZGCBarrierElision.testAtomicThenStore(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)":
> Phase "Final Code":
AFTER: FINAL_CODE
  0  Con  === 13  [[ ]]  #top
  1  Root  === 1 2 21  [[ 1 13 58 47 40 39 ]] inner 
  2  ShouldNotReachHere  === 3 0 0 17 0  [[ 1 ]]  !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
  3  MachProj  === 4  [[ 2 ]] #0/unmatched !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
  4  CallStaticJavaDirect  === 52 15 16 17 18 58 55 57 0 0 0 0 0 0 0 0 57 9 8 7 6  [[ 5 3 54 ]] Static wrapper for: uncommon_trap(reason='speculate_null_check' action='make_not_entrant') # void ( int ) C=0.000100 Objects::requireNonNull @ bci:1 (line 232) reexecute VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324) !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
  6  ConP  === 13  [[ 4 ]]  #NULL
  7  ConP  === 13  [[ 4 ]]  #NULL
  8  ConP  === 13  [[ 4 ]]  #jdk/internal/misc/Unsafe:exact *  Oop:jdk/internal/misc/Unsafe:exact *
  9  ConP  === 13  [[ 4 ]]  #java/lang/invoke/VarHandleReferences$FieldInstanceReadWrite (java/lang/constant/Constable):exact *  Oop:java/lang/invoke/VarHandleReferences$FieldInstanceReadWrite (java/lang/constant/Constable):exact *
 10  IfFalse  === 11  [[ 52 ]] #0 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 11  zeroCheckP_reg_imm0  === 12 14  [[ 10 32 ]] P=0.000001, C=-1.000000 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 12  MachProj  === 13  [[ 11 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:-1 (line 324)
 13  Start  === 13 1  [[ 13 12 14 15 16 17 18 20 0 9 8 7 6 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address, 5:compiler/gcbarriers/Outer *, 6:compiler/gcbarriers/Inner *} !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 14  MachProj  === 13  [[ 11 55 38 38 46 ]] #5  Oop:compiler/gcbarriers/Outer * !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:-1 (line 324)
 15  MachProj  === 13  [[ 4 21 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:-1 (line 324)
 16  MachProj  === 13  [[ 4 31 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:-1 (line 324)
 17  MachProj  === 13  [[ 4 2 21 ]] #3 !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:-1 (line 324)
 18  MachProj  === 13  [[ 4 21 ]] #4 !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:-1 (line 324)
 20  MachProj  === 13  [[ 57 46 37 ]] #6  Oop:compiler/gcbarriers/Inner * !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:-1 (line 324)
 21  Ret  === 22 15 44 17 18  [[ 1 ]] 
 22  MachProj  === 23  [[ 21 46 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:10 (line 325)
 23  membar_release  === 24 0 43 0 0  [[ 22 45 ]]  !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:10 (line 325)
 24  MachProj  === 25  [[ 23 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 25  unnecessary_membar_acquire  === 26 0 42 0 0  |37  [[ 24 43 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 26  MachProj  === 27  [[ 25 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 27  MemBarCPUOrder  === 28 0 34 0 0  [[ 26 42 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 28  MachProj  === 29  [[ 27 37 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 29  MemBarCPUOrder  === 30 0 33 0 0  [[ 28 35 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 30  MachProj  === 31  [[ 29 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 31  membar_volatile  === 53 0 16 0 0  [[ 30 33 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 32  IfTrue  === 11  [[ 53 ]] #1 !jvms: Objects::requireNonNull @ bci:1 (line 232) VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 33  MachProj  === 31  [[ 29 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 34  MergeMem  === _ 0 35 0 0 36  [[ 27 ]]  { - - N36:compiler/gcbarriers/Outer+16 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 35  MachProj  === 29  [[ 34 37 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 36  SCMemProj  === 37  [[ 34 ]]   Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 37  zGetAndSetP  === 28 35 38 20 39 40  [[ 41 36 25 ]] compiler/gcbarriers/Inner * barrier(strong )  Oop:compiler/gcbarriers/Inner * !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 38  addP_reg_imm16  === _ 14 14  [[ 37 ]] compiler/gcbarriers/Outer+16 *  Oop:compiler/gcbarriers/Outer+16 *
 39  MachTemp  === 1  [[ 37 ]] 
 40  MachTemp  === 1  [[ 37 ]] 
 42  MachProj  === 27  [[ 25 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 43  MachProj  === 25  [[ 23 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testAtomicThenStore @ bci:5 (line 324)
 44  MergeMem  === _ 0 45 0 0 46  [[ 21 ]]  { - - N46:compiler/gcbarriers/Outer+16 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:-1 (line 324)
 45  MachProj  === 23  [[ 44 46 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:10 (line 325)
 46  zStoreP  === 22 45 14 20 47  [[ 48 44 ]] memory barrier(strong )  Memory: @compiler/gcbarriers/Outer+16 *, name=field1, idx=5; !jvms: TestZGCBarrierElision::testAtomicThenStore @ bci:10 (line 325)
 47  MachTemp  === 1  [[ 46 ]] 
 52  Region  === 52 10  [[ 52 4 ]] 
 53  Region  === 53 32  [[ 53 31 ]] 
 55  DebugUseSpillCopy  === _ 14  [[ 4 ]]   Oop:compiler/gcbarriers/Outer *
 57  DebugUseSpillCopy  === _ 20  [[ 4 4 ]]   Oop:compiler/gcbarriers/Inner *
 58  loadConI16  === 1  [[ 4 ]] #-164/0xffffff5c

7) Compilation of "static void compiler.gcbarriers.TestZGCBarrierElision.testStoreThenAtomic(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)":
> Phase "Final Code":
AFTER: FINAL_CODE
  0  Con  === 10  [[ ]]  #top
  1  Root  === 1 2 18  [[ 1 10 16 33 41 42 ]] inner 
  2  ShouldNotReachHere  === 3 0 0 14 0  [[ 1 ]]  !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
  3  MachProj  === 4  [[ 2 ]] #0/unmatched !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
  4  CallStaticJavaDirect  === 49 12 13 14 15 16 0 0 6 52  [[ 5 3 51 ]] Static wrapper for: uncommon_trap(reason='null_check' action='maybe_recompile') # void ( int ) C=0.000100 TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308) reexecute !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
  6  ConP  === 10  [[ 4 ]]  #NULL
  7  IfFalse  === 8  [[ 49 ]] #0 !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
  8  zeroCheckP_reg_imm0  === 9 11  [[ 7 29 ]] P=0.000001, C=-1.000000 !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
  9  MachProj  === 10  [[ 8 ]] #0/unmatched !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:-1 (line 308)
 10  Start  === 10 1  [[ 10 9 11 12 13 14 15 17 0 6 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address, 5:compiler/gcbarriers/Outer *, 6:compiler/gcbarriers/Inner *} !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
 11  MachProj  === 10  [[ 8 32 40 40 ]] #5  Oop:compiler/gcbarriers/Outer * !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:-1 (line 308)
 12  MachProj  === 10  [[ 4 18 ]] #1/unmatched !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:-1 (line 308)
 13  MachProj  === 10  [[ 4 28 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:-1 (line 308)
 14  MachProj  === 10  [[ 4 2 18 ]] #3 !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:-1 (line 308)
 15  MachProj  === 10  [[ 4 18 ]] #4 !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:-1 (line 308)
 16  loadConI16  === 1  [[ 4 ]] #-10/0xfffffff6
 17  MachProj  === 10  [[ 52 32 39 ]] #6  Oop:compiler/gcbarriers/Inner * !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:-1 (line 308)
 18  Ret  === 19 12 45 14 15  [[ 1 ]] 
 19  MachProj  === 20  [[ 18 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 20  unnecessary_membar_acquire  === 21 0 44 0 0  |39  [[ 19 45 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 21  MachProj  === 22  [[ 20 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 22  MemBarCPUOrder  === 23 0 36 0 0  [[ 21 44 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 23  MachProj  === 24  [[ 22 39 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 24  MemBarCPUOrder  === 25 0 35 0 0  [[ 23 37 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 25  MachProj  === 26  [[ 24 ]] #0/unmatched !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 26  membar_volatile  === 27 0 30 0 0  [[ 25 35 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 27  MachProj  === 28  [[ 26 32 ]] #0/unmatched !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
 28  membar_release  === 50 0 13 0 0  [[ 27 31 ]]  !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
 29  IfTrue  === 8  [[ 50 ]] #1 !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
 30  MergeMem  === _ 0 31 0 32  [[ 26 ]]  { - N32:compiler/gcbarriers/Outer+16 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:16 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 31  MachProj  === 28  [[ 30 32 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
 32  zStoreP  === 27 31 11 17 33  [[ 34 30 ]] memory barrier(strong )  Memory: @compiler/gcbarriers/Outer+16 *, name=field1, idx=4; !jvms: TestZGCBarrierElision::testStoreThenAtomic @ bci:2 (line 308)
 33  MachTemp  === 1  [[ 32 ]] 
 35  MachProj  === 26  [[ 24 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 36  MergeMem  === _ 0 37 0 38  [[ 22 ]]  { - N38:compiler/gcbarriers/Outer+16 * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 37  MachProj  === 24  [[ 36 39 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 38  SCMemProj  === 39  [[ 36 ]]   Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 39  zGetAndSetP  === 23 37 40 17 41 42  [[ 43 38 20 ]] compiler/gcbarriers/Inner * barrier(strong )  Oop:compiler/gcbarriers/Inner * !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 40  addP_reg_imm16  === _ 11 11  [[ 39 ]] compiler/gcbarriers/Outer+16 *  Oop:compiler/gcbarriers/Outer+16 *
 41  MachTemp  === 1  [[ 39 ]] 
 42  MachTemp  === 1  [[ 39 ]] 
 44  MachProj  === 22  [[ 20 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 45  MachProj  === 20  [[ 18 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$FieldInstanceReadWrite::getAndSet @ bci:31 (line 252) VarHandleGuards::guard_LL_V @ bci:88 (line 55) TestZGCBarrierElision::testStoreThenAtomic @ bci:10 (line 309)
 49  Region  === 49 7  [[ 49 4 ]] 
 50  Region  === 50 29  [[ 50 28 ]] 
 52  DebugUseSpillCopy  === _ 17  [[ 4 ]]   Oop:compiler/gcbarriers/Inner *


One or more @IR rules failed:

Failed IR Rules (9) of Methods (7)
----------------------------------
1) Method "static void compiler.gcbarriers.TestZGCBarrierElision.testAllocateArrayThenStoreAtUnknownIndex(compiler.gcbarriers.Outer,int)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_STORE_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}(zStoreP\S*.*)+(\s){2}===.*barrier\(\s*elided\s*\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

2) Method "static void compiler.gcbarriers.TestZGCBarrierElision.testAllocateThenLoad()" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_LOAD_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}(zLoadP\S*.*)+(\s){2}===.*barrier\(\s*elided\s*\))"
           - Failed comparison: [found] 2 = 1 [given]
             - Matched nodes (2):
               * 62  zLoadP_acq  === _ 61 56 63  [[ 64 10 12 ]] compiler/gcbarriers/Inner * barrier(elided )
               * 67  zLoadP_acq  === _ 66 56 68  [[ 69 4 6 ]] compiler/gcbarriers/Inner * barrier(elided )

3) Method "static void compiler.gcbarriers.TestZGCBarrierElision.testArrayAtomicThenAtomic(compiler.gcbarriers.Outer[],compiler.gcbarriers.Outer)" - [Failed IR rules: 2]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}((zXChgP)|(zGetAndSetP\S*).*)+(\s){2}===.*barrier\(\s*strong\s*\))"
           - Failed comparison: [found] 2 = 1 [given]
             - Matched nodes (2):
               * 54  zGetAndSetP  === 45 52 55 31 56 57  [[ 58 53 42 ]] compiler/gcbarriers/Outer * barrier(strong )
               * 65  zGetAndSetP  === 37 63 66 31 67 68  [[ 69 64 34 ]] compiler/gcbarriers/Outer * barrier(strong )
   * @IR rule 2: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}((zXChgP)|(zGetAndSetP\S*).*)+(\s){2}===.*barrier\(\s*elided\s*\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

4) Method "static void compiler.gcbarriers.TestZGCBarrierElision.testAtomicThenAtomic(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 2]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "strong", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}((zXChgP)|(zGetAndSetP\S*).*)+(\s){2}===.*barrier\(\s*strong\s*\))"
           - Failed comparison: [found] 2 = 1 [given]
             - Matched nodes (2):
               * 43  zGetAndSetP  === 34 41 44 20 45 46  [[ 47 42 31 ]] compiler/gcbarriers/Inner * barrier(strong )
               * 54  zGetAndSetP  === 26 52 55 20 56 57  [[ 58 53 23 ]] compiler/gcbarriers/Inner * barrier(strong )
   * @IR rule 2: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}((zXChgP)|(zGetAndSetP\S*).*)+(\s){2}===.*barrier\(\s*elided\s*\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

5) Method "static void compiler.gcbarriers.TestZGCBarrierElision.testAtomicThenLoad(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 2: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_LOAD_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}(zLoadP\S*.*)+(\s){2}===.*barrier\(\s*elided\s*\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

6) Method "static void compiler.gcbarriers.TestZGCBarrierElision.testAtomicThenStore(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 2: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_STORE_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}(zStoreP\S*.*)+(\s){2}===.*barrier\(\s*elided\s*\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

7) Method "static void compiler.gcbarriers.TestZGCBarrierElision.testStoreThenAtomic(compiler.gcbarriers.Outer,compiler.gcbarriers.Inner)" - [Failed IR rules: 1]:
   * @IR rule 2: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIfCPUFeatureOr={}, applyIf={}, applyIfCPUFeature={}, counts={"_#C#Z_GET_AND_SET_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\d+(\s){2}((zXChgP)|(zGetAndSetP\S*).*)+(\s){2}===.*barrier\(\s*elided\s*\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

@robcasloz
Copy link
Contributor Author

Thanks again @TheRealMDoerr. All failures in your results are caused by missing optimizations (due to the limitations in the analysis) and not by correctness issues. Perhaps we could (in a future PR) split the test file into these two categories, and enable the correctness tests on all platforms.

@RealFYang
Copy link
Member

Hello, I am trying this on my linux-riscv64 platform. Just 10min please.

@RealFYang
Copy link
Member

The test results on linux-riscv64 show that only 'TestZGCBarrierElision.testAllocateArrayThenStoreAtUnknownIndex' failed.
The jtreg test passed if I exclude this one from the original test. It looks to me that the failure is also caused by missing optimization, correct?

Compilation of Failed Method
----------------------------
1) Compilation of "static void compiler.gcbarriers.TestZGCBarrierElision.testAllocateArrayThenStoreAtUnknownIndex(compiler.gcbarriers.Outer,int)":
> Phase "Final Code":
AFTER: FINAL_CODE
   0  Con  === 29  [[ ]]  #top
   1  Root  === 1 2 65 88  [[ 1 29 44 35 64 49 48 84 54 52 ]] inner
   2  ShouldNotReachHere  === 3 0 0 34 0  [[ 1 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
   3  MachProj  === 4  [[ 2 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
   4  CallStaticJavaDirect  === 95 60 61 34 63 64 0 0 0 0 0 0 0 0 0 0 0 0 0 109 9 107 8 107 108 7 6  [[ 5 3 104 ]] Static wrapper for: uncommon_trap(reason='range_check' action='make_not_entrant' debug_id='0') # void ( int ) C=0.000100 VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181) !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
   6  ConP  === 29  [[ 4 ]]  #jdk/internal/util/Preconditions$4 (java/util/function/BiFunction):exact *  Oop:jdk/internal/util/Preconditions$4 (java/util/function/BiFunction):exact *
   7  ConI  === 29  [[ 4 ]]  #int:42
   8  ConP  === 29  [[ 4 ]]  #jdk/internal/misc/Unsafe:exact *  Oop:jdk/internal/misc/Unsafe:exact *
   9  ConP  === 29  [[ 4 ]]  #java/lang/invoke/VarHandleReferences$Array (java/lang/constant/Constable):exact *  Oop:java/lang/invoke/VarHandleReferences$Array (java/lang/constant/Constable):exact *
  10  IfFalse  === 11  [[ 95 ]] #0 !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  11  cmpU_branch  === 13 113 114  [[ 74 10 ]] P=0.000001, C=-1.000000
  13  Proj  === 14  [[ 11 ]] #0 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:7 (line 180)
  14  Blackhole  === 15 57  [[ 13 ]]  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:7 (line 180)
  15  MachProj  === 16  [[ 14 57 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  16  membar_storestore  === 17 0 56 0 0  [[ 15 62 ]]
  17  MachProj  === 18  [[ 16 ]] #0/unmatched
  18  Initialize  === 19 0 40 0 0 0 41  [[ 17 56 ]]  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  19  Region  === 19 97 96  [[ 19 18 41 58 ]]  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  20  CatchProj  === 21  [[ 119 ]] #0@bci -1  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  21  Catch  === 22 38  [[ 20 89 ]]  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  22  MachProj  === 23  [[ 21 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  23  CallStaticJavaDirect  === 99 0 32 34 0 35 112 109 110 0  [[ 24 22 38 42 59 103 ]] Static wrapper for: _new_array_Java # rawptr:NotNull ( java/lang/Object:NotNull *, int ) C=0.000100 TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179) !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  25  IfFalse  === 26  [[ 99 ]] #0
  26  cmpP_branch  === 28 30 27  [[ 39 25 ]] P=0.000100, C=-1.000000
  27  loadP  === 28 32 33  [[ 26 ]] rawptr:BotPTR
  28  MachProj  === 29  [[ 26 31 27 ]] #0/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  29  Start  === 29 1  [[ 29 28 32 34 36 37 60 63 0 114 33 9 8 7 6 111 112 ]]  #{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address, 5:compiler/gcbarriers/Outer *, 6:int} !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  30  addP_reg_imm  === _ 0 31  [[ 26 55 ]] rawptr:BotPTR
  31  loadP  === 28 32 33  [[ 30 53 51 50 45 45 58 ]] rawptr:BotPTR
  32  MachProj  === 29  [[ 31 27 23 55 40 61 75 90 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  33  tlsLoadP  === 29  [[ 31 27 55 ]]
  34  MachProj  === 29  [[ 23 4 2 65 88 ]] #3 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  35  loadConP  === 1  [[ 23 ]] precise [compiler/gcbarriers/Outer: 0x0000003b1464b788 * (java/lang/Cloneable,java/io/Serializable): :Constant:exact *
  36  MachProj  === 29  [[ 109 ]] #5  Oop:compiler/gcbarriers/Outer * !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  37  MachProj  === 29  [[ 110 ]] #6 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  38  MachProj  === 23  [[ 21 88 91 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  39  IfTrue  === 26  [[ 100 ]] #1
  40  MergeMem  === _ 0 41 0 0 0 32  [[ 18 ]]  { - - - N32:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  41  Phi  === 19 42 43  [[ 40 18 ]]  #memory  Memory: @rawptr:BotPTR, idx=Raw;
  42  MachProj  === 23  [[ 41 90 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  43  clearArray_reg_reg  === 100 50 44 45 48 49  [[ 46 47 41 ]]
  44  loadConL  === 1  [[ 43 ]] #42/0x000000000000002a
  45  addP_reg_imm  === _ 31 31  |50 55  [[ 43 ]] rawptr:BotPTR
  48  MachTemp  === 1  [[ 43 ]]
  49  MachTemp  === 1  [[ 43 ]]
  50  storeI  === 100 51 31 111  [[ 43 45 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  51  storeNKlass  === 100 53 31 52  [[ 50 111 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  52  loadConNKlass  === 1  |55  [[ 51 ]] narrowklass: precise [compiler/gcbarriers/Outer: 0x0000003b1464b788 * (java/lang/Cloneable,java/io/Serializable): :Constant:exact *
  53  storeL  === 100 55 31 54  [[ 51 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  54  loadConL  === 1  [[ 53 ]] #1/0x0000000000000001
  55  storeP  === 100 32 33 30  [[ 53 52 45 ]] memory  Memory: @rawptr:BotPTR, idx=Raw;
  56  MachProj  === 18  [[ 16 ]] #2/unmatched  Memory: @rawptr:BotPTR, idx=Raw;
  57  checkCastPP  === 15 58  [[ 14 107 80 80 ]] compiler/gcbarriers/Outer *[int:42] (java/lang/Cloneable,java/io/Serializable):NotNull:exact * !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  58  Phi  === 19 59 31  [[ 57 ]]  #rawptr:BotPTR !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  59  MachProj  === 23  [[ 58 ]] #5 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  60  MachProj  === 29  [[ 4 65 ]] #1/unmatched !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  61  MergeMem  === _ 0 32 62 62 62 62  [[ 4 ]]  { N62:rawptr:BotPTR N62:java/lang/Object * N62:java/lang/Object+8 * [narrowklass] N62:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  62  MachProj  === 16  [[ 61 61 61 61 75 75 75 75 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  63  MachProj  === 29  [[ 4 65 88 ]] #4 !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:-1 (line 179)
  64  loadConI  === 1  [[ 4 ]] #-28/0xffffffe4
  65  Ret  === 66 60 87 34 63  [[ 1 ]]
  66  MachProj  === 67  [[ 65 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  67  membar_volatile  === 68 0 86 0 0  |79  [[ 66 87 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  68  MachProj  === 69  [[ 67 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  69  MemBarCPUOrder  === 70 0 77 0 0  [[ 68 86 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  70  MachProj  === 71  [[ 69 79 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  71  MemBarCPUOrder  === 72 0 76 0 0  [[ 70 78 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  72  MachProj  === 73  [[ 71 ]] #0/unmatched !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  73  membar_release  === 101 0 75 0 0  [[ 72 76 ]]  !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  74  IfTrue  === 11  [[ 101 ]] #1 !jvms: VarHandleReferences$Array::setVolatile @ bci:32 (line 612) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  75  MergeMem  === _ 0 32 62 62 62 62  [[ 73 ]]  { N62:rawptr:BotPTR N62:java/lang/Object * N62:java/lang/Object+8 * [narrowklass] N62:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:54 (line 613) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  76  MachProj  === 73  [[ 71 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  77  MergeMem  === _ 0 78 0 0 0 79  [[ 69 ]]  { - - - N79:java/lang/Object *[int:>=0] (java/lang/Cloneable,java/io/Serializable)+any * }  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  78  MachProj  === 71  [[ 77 79 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  79  zStoreP  === 70 78 80 109 84  [[ 85 77 67 ]] memory barrier(strong )  Memory: @compiler/gcbarriers/Outer *[int:42] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *, idx=6; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  80  addP_reg_reg  === _ 57 57 81  [[ 79 ]] compiler/gcbarriers/Outer *[int:42] (java/lang/Cloneable,java/io/Serializable):NotNull:exact+any *
  81  lShiftL_reg_imm  === _ 82  [[ 80 ]] #3/0x00000003
  82  convI2L_reg_reg  === _ 83  [[ 81 ]]
  83  castII  === 101 113  [[ 82 ]] int:>=0:www
  84  MachTemp  === 1  [[ 79 ]]
  86  MachProj  === 69  [[ 67 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  87  MachProj  === 67  [[ 65 ]] #2/unmatched  Memory: @BotPTR *+bot, idx=Bot; !jvms: VarHandleReferences$Array::setVolatile @ bci:57 (line 611) VarHandleGuards::guard_LIL_V @ bci:50 (line 701) TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:16 (line 181)
  88  RethrowException  === 102 38 90 34 63 118  [[ 1 ]]
  89  CatchProj  === 21  [[ 102 ]] #1@bci -1  !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  90  MergeMem  === _ 0 32 42  [[ 88 ]]  { N42:rawptr:BotPTR }  Memory: @BotPTR *+bot, idx=Bot; !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  91  CreateException  === 102 38  [[ 118 ]] java/lang/Throwable (java/io/Serializable):NotNull *  Oop:java/lang/Throwable (java/io/Serializable):NotNull * !jvms: TestZGCBarrierElision::testAllocateArrayThenStoreAtUnknownIndex @ bci:2 (line 179)
  95  Region  === 95 10  [[ 95 4 ]]
  96  branch  === 100  [[ 19 ]]  !orig=94
  97  branch  === 98  [[ 19 ]]  !orig=94
  98  Region  === 98 120  [[ 98 97 ]]
  99  Region  === 99 25  [[ 99 23 ]]
 100  Region  === 100 39  [[ 100 96 43 50 51 53 55 ]]
 101  Region  === 101 74  [[ 101 73 83 ]]
 102  Region  === 102 89  [[ 102 88 91 ]]
 107  DebugUseSpillCopy  === _ 57  [[ 4 4 ]]
 108  DebugUseSpillCopy  === _ 113  [[ 4 ]]
 109  DefinitionSpillCopy  === _ 36  [[ 23 79 4 ]]   Oop:compiler/gcbarriers/Outer *
 110  DefinitionSpillCopy  === _ 37  [[ 23 113 ]]
 111  loadConI  === 29  |51  [[ 50 ]] #42/0x0000002a
 112  loadConI  === 29  [[ 23 ]] #42/0x0000002a
 113  MemToRegSpillCopy  === _ 110  [[ 11 83 108 ]]
 114  loadConI  === 29  [[ 11 ]] #42/0x0000002a
 118  BoundSpillCopy  === _ 91  [[ 88 ]]   Oop:java/lang/Throwable (java/io/Serializable):NotNull *
 119  Region  === 119 20  [[ 119 120 ]]
 120  branch  === 119  [[ 98 ]]  !orig=94

----------System.err:(44/4374)*----------

Command Line:
/home/fyang/openjdk-zgc/build/linux-riscv64-server-fastdebug/images/jdk/bin/java -DReproduce=true -cp /home/fyang/openjdk-zgc/build/linux-riscv64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_compiler_gcbarriers_TestZGCBarrierElision_java/classes/0/compiler/gcbarriers/TestZGCBarrierElision.d:/home/fyang/openjdk-zgc/test/hotspot/jtreg/compiler/gcbarriers:/home/fyang/openjdk-zgc/build/linux-riscv64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_compiler_gcbarriers_TestZGCBarrierElision_java/classes/0/test/lib:/home/fyang/openjdk-zgc/build/linux-riscv64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_compiler_gcbarriers_TestZGCBarrierElision_java/classes/0:/home/fyang/tools/jtreg/lib/javatest.jar:/home/fyang/tools/jtreg/lib/jtreg.jar:/home/fyang/tools/jtreg/lib/junit-platform-console-standalone-1.8.2.jar:/home/fyang/tools/jtreg/lib/testng-7.3.0.jar:/home/fyang/tools/jtreg/lib/guice-4.2.3.jar:/home/fyang/tools/jtreg/lib/jcommander-1.78.jar -Djava.library.path=. -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx768m -XX:MaxRAMPercentage=12.5 -Dtest.boot.jdk=/home/fyang/tools/boot-jdk -Djava.io.tmpdir=/home/fyang/openjdk-zgc/build/linux-riscv64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_compiler_gcbarriers_TestZGCBarrierElision_java/tmp -ea -esa -Dir.framework.server.port=33841 -XX:+UseZGC -XX:+UnlockExperimentalVMOptions -XX:CompileCommand=blackhole,compiler.gcbarriers.TestZGCBarrierElision::blackhole -XX:CompileCommand=dontinline,compiler.gcbarriers.TestZGCBarrierElision::nonInlinedMethod -XX:LoopMaxUnroll=0 -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:CompilerDirectivesFile=test-vm-compile-commands-pid-4042609.log -XX:CompilerDirectivesLimit=301 -XX:-OmitStackTraceInFastThrow -DShouldDoIRVerification=true -XX:-BackgroundCompilation -XX:CompileCommand=quiet compiler.lib.ir_framework.test.TestVM compiler.gcbarriers.TestZGCBarrierElision

One or more @IR rules failed:

Failed IR Rules (1) of Methods (1)
----------------------------------
1) Method "static void compiler.gcbarriers.TestZGCBarrierElision.testAllocateArrayThenStoreAtUnknownIndex(compiler.gcbarriers.Outer,int)" - [Failed IR rules: 1]:
   * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={FINAL_CODE}, applyIf={}, applyIfCPUFeatureOr={}, applyIfCPUFeature={}, counts={"_#C#Z_STORE_P_WITH_BARRIER_FLAG#_", "elided", "1"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
     > Phase "Final Code":
       - counts: Graph contains wrong number of nodes:
         * Constraint 1: "(\\d+(\\s){2}(zStoreP\\S*.*)+(\\s){2}===.*barrier\\(\\s*elided\\s*\\))"
           - Failed comparison: [found] 0 = 1 [given]
           - No nodes matched!

>>> Check stdout for compilation output of the failed methods


  #############################################################
   - To only run the failed tests use -DTest, -DExclude,
     and/or -DScenarios.
   - To also get the standard output of the test VM run with
     -DReportStdout=true or for even more fine-grained logging
     use -DVerbose=true.
  #############################################################


compiler.lib.ir_framework.driver.irmatching.IRViolationException: There were one or multiple IR rule failures. Please check stderr for more information.
        at compiler.lib.ir_framework.driver.irmatching.IRMatcher.reportFailures(IRMatcher.java:61)
        at compiler.lib.ir_framework.driver.irmatching.IRMatcher.match(IRMatcher.java:49)
        at compiler.lib.ir_framework.TestFramework.runTestVM(TestFramework.java:754)
        at compiler.lib.ir_framework.TestFramework.start(TestFramework.java:719)
        at compiler.lib.ir_framework.TestFramework.start(TestFramework.java:339)
        at compiler.lib.ir_framework.TestFramework.runWithFlags(TestFramework.java:245)
        at compiler.gcbarriers.TestZGCBarrierElision.main(TestZGCBarrierElision.java:79)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
        at java.base/java.lang.Thread.run(Thread.java:1623)

JavaTest Message: Test threw exception: compiler.lib.ir_framework.driver.irmatching.IRViolationException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: compiler.lib.ir_framework.driver.irmatching.IRViolationException: There were one or multiple IR rule failures. Please check stderr for more information.


test result: Failed. Execution failed: `main' threw exception: compiler.lib.ir_framework.driver.irmatching.IRViolationException: There were one or multiple IR rule failures. Please check stderr for more information.

@robcasloz
Copy link
Contributor Author

It looks to me that the failure is also caused by missing optimization, correct?

That's correct @RealFYang, thanks for the feedback!

@robcasloz
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Feb 20, 2023

Going to push as commit dc9fe9a.
Since your change was applied there have been 124 commits pushed to the zgc_generational branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 20, 2023
@openjdk openjdk bot closed this Feb 20, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 20, 2023
@openjdk
Copy link

openjdk bot commented Feb 20, 2023

@robcasloz Pushed as commit dc9fe9a.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants