Skip to content

x86: Implement vblend - #8010

Merged
0xdaryl merged 3 commits into
eclipse-omr:masterfrom
BradleyWood:vblend
Nov 8, 2025
Merged

x86: Implement vblend#8010
0xdaryl merged 3 commits into
eclipse-omr:masterfrom
BradleyWood:vblend

Conversation

@BradleyWood

Copy link
Copy Markdown
Contributor

No description provided.

@BradleyWood

Copy link
Copy Markdown
Contributor Author

jenkins build all

Comment thread compiler/x/codegen/OMRTreeEvaluator.cpp Outdated
cg->decReferenceCount(rhsNode);
cg->decReferenceCount(maskNode);

if (node->getNumChildren() == 4) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

According to [1], vblend only has 3 children. What is this check for?

[1]

/* .operation = */ vblend, \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When I implemented this, there was a bug in the optimizer where an additional erroneous child argument was present. I'm not sure if that issue was fixed, I will have to check.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

n4306n   (  0)  vstoreiVector128Int32  <array-shadow>[#241  Shadow] [flags 0x80000613 0x0 ] ()       
n6457n   (  0)    aladd (X>=0 internalPtr )                                                          
n35n     (  1)      ==>newarray (in &GPR_0127) (highWordZero Unsigned X!=0 allocationCanBeRemoved )
n1617n   (  0)      lconst 8 (highWordZero X!=0 X>=0 cannotOverflow )                                
n3768n   (  0)    vblendVector128Int32 (in VRF_0137) ()                                              
n2295n   (  0)      vloadiVector128Int32  <array-shadow>[#241  Shadow] [flags 0x80000613 0x0 ] (in VR
n6413n   (  0)        aladd (X>=0 internalPtr )                                                      
n6535n   (  0)          ==>aRegLoad (in &GPR_0017) (X!=0 SeenRealReference )
n1617n   (  0)          ==>lconst 8 (highWordZero X!=0 X>=0 cannotOverflow )
n3265n   (  0)      vloadiVector128Int32  <array-shadow>[#241  Shadow] [flags 0x80000613 0x0 ] (in VR
n6428n   (  0)        aladd (X>=0 internalPtr )                                                      
n6534n   (  0)          ==>aRegLoad (in &GPR_0016) (X!=0 SeenRealReference )
n1617n   (  0)          ==>lconst 8 (highWordZero X!=0 X>=0 cannotOverflow )
n1134n   (  0)      i2mVector128Int32 (in VRF_0136) ()                                               
n6408n   (  0)        iloadi  <generic int shadow>[#1226  Shadow] [flags 0x603 0x0 ] (in GPR_0134)   
n6397n   (  0)          aladd (X>=0 internalPtr )                                                    
n6536n   (  0)            ==>aRegLoad (in &GPR_0018) (X!=0 SeenRealReference )
n1617n   (  0)            ==>lconst 8 (highWordZero X!=0 X>=0 cannotOverflow )
n4096n   (  1)      l2a (node obj11)                                                                 
n6642n   (  1)        lshl (compressionSequence )                                                    
n6641n   (  1)          ==>iu2l (in GPR_0131)
n6639n   (  1)          iconst 3 (X!=0 X>=0 )                                                        
-----------------------------

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your tree suggests the bug is still there. How pervasive is the problem and what's the status on resolving it? I am dubious about checking in a workaround to counter the case of an invalid vblend.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the extra child is always present if vblend is generated by OpenJ9. I asked @gita-omr to look into it. I don't have a timeline for that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A fix has been proposed so I have removed this check. This PR should not be merged until the corresponding OpenJ9 fix is in.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the extra child is always present if vblend is generated by OpenJ9. I asked @gita-omr to look into it. I don't have a timeline for that.

It's 10 characters change. I will do it now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Opened eclipse-openj9/openj9#22876. Hopefully this is not holding this PR any more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request eclipse-openj9/openj9#22876 has been merged, so merging this pull request shouldn't harm that downstream project.

Bradley Wood added 3 commits October 31, 2025 16:58
Signed-off-by: Bradley Wood <bradley.wood@ibm.com>
Signed-off-by: Bradley Wood <bradley.wood@ibm.com>
Signed-off-by: Bradley Wood <bradley.wood@ibm.com>
@0xdaryl
0xdaryl merged commit 7851e70 into eclipse-omr:master Nov 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants