-
Notifications
You must be signed in to change notification settings - Fork 5k
Implement SVE2 BitwiseSelect, BitwiseSelectLeftInverted, BitwiseSelectRightInverted #115775
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
Conversation
case NI_Sve2_BitwiseSelectRightInverted: | ||
// op1: select, op2: left, op3: right | ||
// Operation is destructive on the 'left' operand. | ||
if (targetReg != op2Reg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be op1Reg
because 1st operand has RMW semantics, not 2nd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kunalspathak this didn't need addressing because the logic was already correct, right?
The instruction is BSL <Zdn>.D, <Zdn>.D, <Zm>.D, <Zk>.D
and the operation is:
CheckSVEEnabled();
constant integer VL = CurrentVL;
bits(VL) operand1 = Z[dn, VL];
bits(VL) operand2 = Z[m, VL];
bits(VL) operand3 = Z[k, VL];
Z[dn, VL] = (operand1 AND operand3) OR (operand2 AND NOT(operand3));
So we end up emitting mov tgt, op2; BSL tgt, op3, op1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, it was already resolved in #115775 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/ba-g failures unrelated |
1 similar comment
/ba-g failures unrelated |
@a74nh @kunalspathak
Contributes to #115479