WIP: Z: Add l2i case for TM reduction #7298
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This draft PR updates the function
generateTestUnderMaskIfPossible
to add the case of l2i for pattern matching trees in order to reduce a specific set of instructions intoTM + BRC
in memory test.The following is an example tree with a specific pattern with an ificmpne node against zero, with an iand child. The iand child with l2i first child, and constant second child.
The variables
depth
,refCountZero
, and thememory reference node
are updated to capture the above pattern for the l2i node. The updated variables are later used for pattern matching when considering l2i node with a memory reference of depth 2.The LOAD, AND, CMP instructions generated from this specific pattern are replaced by
TM + BRC
sequence, which uses the updated memory reference node.Updated set of tress with TM reduction for l2i node, from an OpenJ9 trace log produced off a JLTF job:
Tagging @r30shah for review and verification if more changes may be needed to the function.