-
Notifications
You must be signed in to change notification settings - Fork 5.2k
JIT ARM64-SVE: Allow LCL_VARs to store as mask #99608
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
Changes from 1 commit
6628904
ed574f9
02fa227
2e2e174
fcdb18a
687af37
1fc8d5b
9dbfe63
85f09bf
7945d51
bd5d951
ce61a40
b5502a6
39c02d0
d8dea0e
8ec8e38
3ec441c
f569512
0110170
ec05e34
71bcb48
24cd68b
5b995ae
3a82d5d
8baee38
b22755a
bd8db6e
e359c93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2771,7 +2771,16 @@ void CodeGen::genCodeForLclVar(GenTreeLclVar* tree) | |
| emitAttr attr = emitActualTypeSize(targetType); | ||
|
|
||
| emitter* emit = GetEmitter(); | ||
| emit->emitIns_R_S(ins, attr, tree->GetRegNum(), varNum, 0); | ||
|
|
||
| if (ins == INS_sve_ldr && !varTypeUsesMaskReg(targetType)) | ||
| { | ||
| emit->emitIns_R_S(ins, attr, tree->GetRegNum(), varNum, 0, INS_SCALABLE_OPTS_UNPREDICATED); | ||
| } | ||
| else | ||
| { | ||
| emit->emitIns_R_S(ins, attr, tree->GetRegNum(), varNum, 0); | ||
| } | ||
|
|
||
| genProduceReg(tree); | ||
| } | ||
| } | ||
|
|
@@ -2956,7 +2965,15 @@ void CodeGen::genCodeForStoreLclVar(GenTreeLclVar* lclNode) | |
| instruction ins = ins_StoreFromSrc(dataReg, targetType); | ||
| emitAttr attr = emitActualTypeSize(targetType); | ||
|
|
||
| emit->emitIns_S_R(ins, attr, dataReg, varNum, /* offset */ 0); | ||
| // TODO-SVE: Removable once REG_V0 and REG_P0 are distinct | ||
| if (ins == INS_sve_str && !varTypeUsesMaskReg(targetType)) | ||
| { | ||
| emit->emitIns_S_R(ins, attr, dataReg, varNum, /* offset */ 0, INS_SCALABLE_OPTS_UNPREDICATED); | ||
| } | ||
|
||
| else | ||
| { | ||
| emit->emitIns_S_R(ins, attr, dataReg, varNum, /* offset */ 0); | ||
| } | ||
| } | ||
| else // store into register (i.e move into register) | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6419,6 +6419,17 @@ void Compiler::impImportBlockCode(BasicBlock* block) | |
| impSpillSideEffects(false, CHECK_SPILL_ALL DEBUGARG("Spill before store to pinned local")); | ||
| } | ||
|
|
||
| #if defined(TARGET_ARM64) && defined(FEATURE_MASKED_SIMD) | ||
| // Masks must be converted to vectors before being stored to memory. | ||
| // But, for local stores we can optimise away the conversion | ||
| if (op1->OperIsHWIntrinsic() && op1->AsHWIntrinsic()->GetHWIntrinsicId() == NI_Sve_ConvertMaskToVector) | ||
a74nh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| op1 = op1->AsHWIntrinsic()->Op(1); | ||
| lvaTable[lclNum].lvType = TYP_MASK; | ||
|
||
| lclTyp = lvaGetActualType(lclNum); | ||
| } | ||
|
||
| #endif // TARGET_ARM64 && FEATURE_MASKED_SIMD | ||
|
|
||
| op1 = gtNewStoreLclVarNode(lclNum, op1); | ||
|
|
||
| // TODO-ASG: delete this zero-diff quirk. Requires some forward substitution work. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.