Skip to content

Z: Implement mTrueCount, mFirstTrue, and mLastTrue opcodes#8112

Open
ehsankianifar wants to merge 1 commit intoeclipse-omr:masterfrom
ehsankianifar:Z_add-mFirst-mLast-mTrueCount-evaluators
Open

Z: Implement mTrueCount, mFirstTrue, and mLastTrue opcodes#8112
ehsankianifar wants to merge 1 commit intoeclipse-omr:masterfrom
ehsankianifar:Z_add-mFirst-mLast-mTrueCount-evaluators

Conversation

@ehsankianifar
Copy link
Contributor

Add support for the mTrueCount, mFirstTrue, and mLastTrue vector mask operations on IBM Z.
mTrueCount computes the number of lanes set to true in a mask.
mFirstTrue returns the index of the first true lane.
mLastTrue returns the index of the last true lane. These opcode implementations enable efficient mask-reduction behaviour on the IBM Z backend.

@ehsankianifar
Copy link
Contributor Author

@r30shah @hzongaro @gita-omr please take a look and merge this PR if looks good to you. Thanks.

Copy link
Contributor

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

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

I think this looks good. Just a couple of minor comments.

@hzongaro hzongaro self-assigned this Feb 6, 2026
Add support for the mTrueCount, mFirstTrue, and mLastTrue vector mask
operations on IBM Z.
mTrueCount computes the number of lanes set to true in a mask.
mFirstTrue returns the index of the first true lane.
mLastTrue returns the index of the last true lane.
These opcode implementations enable efficient mask-reduction behavior
on the IBM Z backend.

signed-off-by: Ehsan Kiani Far <ehsan.kianifar@gmail.com>
@ehsankianifar ehsankianifar force-pushed the Z_add-mFirst-mLast-mTrueCount-evaluators branch from ebf4e78 to 025ae32 Compare February 6, 2026 18:17
Copy link
Contributor

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

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.

2 participants

Comments