Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle maskReductionCoerced element type in VectorAPIExpansion #16350

Merged
merged 1 commit into from Nov 24, 2022

Conversation

gita-omr
Copy link
Contributor

  • maskReductionCoerced intrinsic has element type Int for Float vectors and Long for Double vectors. For the sake of class verification we can leave _elementType field unset and it will be automatically derived from the child type (since they will be in the same class)

- maskReductionCoerced intrinsic has element type Int for Float vectors and Long for Double vectors.
  For the sake of class verification we can leave _elementType field unset
  and it will be automatically derived from the child type (since they will be in the same class)
@Akira1Saitoh
Copy link
Contributor

@gita-omr I confirmed that the code below gets vectorized with this PR.

       for (int i = 0; i < a.length; i += SPECIES.length()) {
          FloatVector va = FloatVector.fromArray(SPECIES, a, i);
          FloatVector vb = FloatVector.fromArray(SPECIES, b, i);
          VectorMask<Float> vm = va.eq(vb);
          ints[i] = vm.trueCount();
       }
------------------------------
 n7004n   (  0)  istorei  <array-shadow>[#206  Shadow] [flags 0x80000603 0x0 ]                        [    0xffff7ef1ad00] bci=[-1,50,46] rc=0 vc=7059 vn=- li=402 udi=- nc=2
 n7005n   (  1)    aladd (X>=0 internalPtr sharedMemory )                                             [    0xffff7ef1ad50] bci=[-1,50,46] rc=1 vc=7059 vn=- li=402 udi=- nc=2 flg=0x8100
 n7221n   (  5)      ==>aRegLoad (in &GPR_0180) (X!=0 SeenRealReference sharedMemory )
 n7220n   (  5)      ==>lRegLoad (in GPR_0179) (highWordZero X>=0 cannotOverflow SeenRealReference )
 n7008n   (  1)    l2i                                                                                [    0xffff7ef1ae40] bci=[45,19,707] rc=1 vc=7059 vn=- li=402 udi=- nc=1
 n7009n   (  1)      mTrueCountVector128Float ()                                                      [    0xffff7ef1ae90] bci=[45,16,707] rc=1 vc=7059 vn=- li=402 udi=- nc=1 flg=0x20
 n7010n   (  1)        vcmpeqVector128Float ()                                                        [    0xffff7ef1aee0] bci=[35,42,1905] rc=1 vc=7059 vn=- li=402 udi=- nc=2 flg=0x20
 n7011n   (  1)          vloadi  <array-shadow>[#224  Shadow] [flags 0x80000615 0x0 ] ()              [    0xffff7ef1af30] bci=[8,32,3289] rc=1 vc=7059 vn=- li=402 udi=- nc=1 flg=0x20
 n7012n   (  1)            aladd (X>=0 sharedMemory )                                                 [    0xffff7ef1af80] bci=[-1,0,42] rc=1 vc=7059 vn=- li=402 udi=- nc=2 flg=0x100
 n7223n   (  5)              ==>aRegLoad (in &GPR_0182) (X!=0 SeenRealReference sharedMemory )
 n7218n   (  6)              ==>lRegLoad (in GPR_0177) (highWordZero X>=0 cannotOverflow SeenRealReference )
 n7015n   (  1)          vloadi  <array-shadow>[#224  Shadow] [flags 0x80000615 0x0 ] ()              [    0xffff7ef1b070] bci=[24,32,3289] rc=1 vc=7059 vn=- li=402 udi=- nc=1 flg=0x20
 n7016n   (  1)            aladd (X>=0 sharedMemory )                                                 [    0xffff7ef1b0c0] bci=[-1,0,42] rc=1 vc=7059 vn=- li=402 udi=- nc=2 flg=0x100
 n7222n   (  5)              ==>aRegLoad (in &GPR_0181) (X!=0 SeenRealReference sharedMemory )
 n7218n   (  6)              ==>lRegLoad (in GPR_0177) (highWordZero X>=0 cannotOverflow SeenRealReference )
------------------------------

@gita-omr
Copy link
Contributor Author

Jenkins test sanity all jdk8,jdk11,jdk19

@gita-omr
Copy link
Contributor Author

Jenkins test sanity win jdk8,jdk11,jdk19

@gita-omr gita-omr changed the title WIP: Handle maskReductionCoerced element type in VectorAPIExpansion Handle maskReductionCoerced element type in VectorAPIExpansion Nov 23, 2022
@gita-omr
Copy link
Contributor Author

All sanity passed. Ready for review.

@knn-k knn-k merged commit 78038a1 into eclipse-openj9:master Nov 24, 2022
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.

None yet

3 participants