openj9
openj9 copied to clipboard
Handle masked operations in VectorAPIExpansion
- handle a simple test case where mask is produced by vector compare() and consumed by unary, binary, or ternary vector operation with mask
- mask has internal, platform specific, representation
- loading or storing of masks is not allowed since conversion to/from Java representation is needed.
- WIP since we need to make sure masks cannot be loaded or stored
Depends on https://github.com/eclipse/omr/pull/6636
For this test case:
for (int i = 0; i < a.length; i += SPECIES.length()) {
TYPE2Vector va = TYPE2Vector.fromArray(SPECIES, a, i);
TYPE2Vector vb = TYPE2Vector.fromArray(SPECIES, b, i);
va.lanewise(VectorOperators.ADD, vb, va.compare(VectorOperators.GT, vb)).intoArray(c, i);
}
we create these trees:
n5309n ( 0) vstorei <array-shadow>[#265 Shadow] [flags 0x80000615 0x0 ] () [ 0x72d5447c6b30] bci=[58,43,3075] rc=0 vc=1941 vn=- li=4 udi=- nc=2 flg=0x20
n9802n ( 1) aladd (X>=0 sharedMemory ) [ 0x72d40741e790] bci=[-1,0,48] rc=1 vc=1941 vn=- li=4 udi=- nc=2 flg=0x100
n11466n ( 2) ==>aRegLoad (in &GPR_0115) (SeenRealReference sharedMemory )
n9738n ( 3) lsub (X>=0 cannotOverflow ) [ 0x72d40741d390] bci=[-1,0,48] rc=3 vc=1941 vn=- li=4 udi=- nc=2 flg=0x1100
n9736n ( 1) lshl (X>=0 cannotOverflow ) [ 0x72d40741d2f0] bci=[-1,0,48] rc=1 vc=1941 vn=- li=4 udi=- nc=2 flg=0x1100
n1536n ( 1) i2l (highWordZero X>=0 ) [ 0x72d54440cfd0] bci=[11,4,3538] rc=1 vc=1941 vn=- li=4 udi=- nc=1 flg=0x4100
n11463n ( 2) ==>iRegLoad (in GPR_0112) (X>=0 cannotOverflow SeenRealReference )
n9737n ( 1) iconst 2 (Unsigned X!=0 X>=0 ) [ 0x72d40741d340] bci=[-1,0,48] rc=1 vc=1941 vn=- li=4 udi=- nc=0 flg=0x4104
n9739n ( 1) lconst -16 (X!=0 X<=0 ) [ 0x72d40741d3e0] bci=[-1,0,48] rc=1 vc=1941 vn=- li=4 udi=- nc=0 flg=0x204
n3772n ( 1) vmaddVector128Float () [ 0x72d544688ac0] bci=[42,93,811] rc=1 vc=1941 vn=- li=4 udi=- nc=3 flg=0x20
n1362n ( 2) vloadi <array-shadow>[#265 Shadow] [flags 0x80000615 0x0 ] () [ 0x72d544409970] bci=[6,32,3289] rc=2 vc=1941 vn=- li=4 udi=- nc=1 flg=0x20
n9740n ( 1) aladd (X>=0 sharedMemory ) [ 0x72d40741d430] bci=[-1,0,48] rc=1 vc=1941 vn=- li=4 udi=- nc=2 flg=0x100
n11465n ( 2) ==>aRegLoad (in &GPR_0114) (X!=0 SeenRealReference sharedMemory )
n9738n ( 3) ==>lsub (X>=0 cannotOverflow )
n2248n ( 2) vloadi <array-shadow>[#265 Shadow] [flags 0x80000615 0x0 ] () [ 0x72d54451ae60] bci=[20,32,3289] rc=2 vc=1941 vn=- li=4 udi=- nc=1 flg=0x20
n9758n ( 1) aladd (X>=0 sharedMemory ) [ 0x72d40741d9d0] bci=[-1,0,48] rc=1 vc=1941 vn=- li=4 udi=- nc=2 flg=0x100
n11467n ( 2) ==>aRegLoad (in &GPR_0116) (SeenRealReference sharedMemory )
n9738n ( 3) ==>lsub (X>=0 cannotOverflow )
n2765n ( 1) vcmpgtVector128Float () [ 0x72d5445d5000] bci=[30,42,1905] rc=1 vc=1941 vn=- li=4 udi=- nc=2 flg=0x20
n1362n ( 2) ==>vloadi ()
n2248n ( 2) ==>vloadi ()
Added more masked opcodes.
Fixed line endings.
Added new, Mask, type.
Jenkins test sanity all jdk8,jdk19 depends eclipse/omr#6636
Jenkins test sanity all jdk8,jdk19 depends eclipse/omr#6636
Jenkins test sanity all jdk8,jdk19
I think the OMR PR this PR depends on got propagated so will start the build again.
Jenkins test sanity all jdk8,jdk19
Ready for review.
Rebased in order to address the comments.
Addressed the comments above.
Fixed line endings.
Addressed latest comments.
jenkins test sanity plinux,win,aix,zlinux jdk8,jdk11
wondering if i need to launch some tests on vector api (which release? how to enable -- with specific options i figured?)
wondering if i need to launch some tests on vector api (which release? how to enable -- with specific options i figured?)
No special options are needed. I believe openjdk tests run as part of acceptance test now (with some enforcing options).
I think I missed some cosmetic comments. I will address them next time I change this file. Thanks so much for the review!