Skip to content

Conversation

@gita-omr
Copy link
Contributor

@gita-omr gita-omr commented Jun 9, 2025

  • msplats opcode takes 'true' or 'false' value and splats it into all lanes of the mask
  • 'true' must be represented as -1 and 'false' as 0 of type TR::Int8
  • operation is undefined for any other value
  • implement Power evaluator

@gita-omr
Copy link
Contributor Author

Minor fixes.

@gita-omr
Copy link
Contributor Author

After some thinking and discussions, we would like to propose that false value is represented as TR::Int64 type and value 0. The true value will be represented as TR::Int64 value -1.

This will make it easier to splat a -1 value to all mask elements on platforms that don't have Mask registers. On those platforms, all mask operations happen bit-wise and therefore true lanes should contain all 1s.

It should also help platforms that have Mask registers since the passed long value will represent the whole mask.

If other values are passed, the behavior is undefined.

@gita-omr
Copy link
Contributor Author

On the second thought, the child type can be TR::Int8. Codegen can always do b2l (usually noop) if needed. We would like to keep the opcode's semantics to a minimum.

@vijaysun-omr
Copy link
Contributor

I support that thought. It seemed a bit unnatural to require a 64-bit value to pass in true or false otherwise. Even for projects that represent true and false as byte (8-bit).

@gita-omr
Copy link
Contributor Author

Updated according to the comments above.

@gita-omr
Copy link
Contributor Author

Jenkins build ppc64le

@gita-omr gita-omr marked this pull request as ready for review June 20, 2025 14:43
@gita-omr
Copy link
Contributor Author

jenkins build plinux

@gita-omr
Copy link
Contributor Author

Improved opcode description.

@gita-omr
Copy link
Contributor Author

Improved commit message

@gita-omr
Copy link
Contributor Author

Fixed typo

- msplats opcode takes 'true' or 'false' value and splats it into all lanes of the mask
- 'true' must be represented as -1 and 'false' as 0 of type TR::Int8
- operation is undefined for any other value
- implement Power evaluator
@0xdaryl
Copy link
Contributor

0xdaryl commented Jun 23, 2025

Jenkins build all

@gita-omr
Copy link
Contributor Author

Build failures seem unrelated to me.

@0xdaryl 0xdaryl merged commit ba62048 into eclipse-omr:master Jun 24, 2025
12 of 13 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.

5 participants