Support v2m opcode on Power - #7737
Conversation
|
jenkins build plinux,aix |
| OMR::Power::TreeEvaluator::v2mEvaluator(TR::Node *node, TR::CodeGenerator *cg) | ||
| { | ||
| return TR::TreeEvaluator::unImpOpEvaluator(node, cg); | ||
| return TR::TreeEvaluator::passThroughEvaluator(node, cg); |
There was a problem hiding this comment.
on Power, vectors and masks reside in the same register it can be a passThrough evaluator
That doesn't sound right to me. This opcode is is meant for converting a mask, in the form a boolean array (when 16+ lanes are present) into a mask. The mask (as a vector) cannot be in the form of a boolean array. Each lane should be all 1's or all 0's. Furthermore, the number of boolean[] elements at 8-bit in a 128-bit vector is 16. What if the elements in your mask operations are 16-bit? For instance, vmaddVector256Int16, it would have 16 elements, therefore, the vector you load is Vector128Int8 -- half the size, and incorrect lane type.
|
Made WIP to clarify the definition of |
|
I agree with some points in #7737 (comment) but I think some don't apply to Power.
For example, since vector length on Power is 128-bit, the biggest mask will contain 16 elements (if vector elements are bytes). So we will use Then,
|
|
Changed code and commit comment according to the comment above. |
|
Removed the extension code in |
- TR::v2m opcode converts boolean vector into mask - least-significant bit of each byte element should be left-extended - mload/mloadi opcodes don't have to extend the bit since they load correct mask representation stored by mstore/mstorei
|
Improved commit message. |
|
Ready for another review. @BradleyWood @dsouzai |
|
Looks OK to me; will wait for @BradleyWood's OK. |
|
OMR Jenkins instance is still down; could you run an internal build (or run the OMR tests on a P machine manually) to make sure there's no issues? |
|
jenkins build plinux,aix |
mask representation stored by mstore/mstorei