[llvm] [LLVM] Add `llvm.masked.compress` intrinsic (PR #92289)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 13:24:08 PDT 2024
================
@@ -5720,6 +5737,23 @@ SDValue DAGTypeLegalizer::WidenVecRes_VP_STRIDED_LOAD(VPStridedLoadSDNode *N) {
return Res;
}
+SDValue DAGTypeLegalizer::WidenVecRes_MASKED_COMPRESS(SDNode *N) {
+ SDValue Vec = N->getOperand(0);
+ SDValue Mask = N->getOperand(1);
+ SDValue Passthru = N->getOperand(2);
+ EVT WideVecVT =
+ TLI.getTypeToTransformTo(*DAG.getContext(), Vec.getValueType());
+ EVT WideMaskVT = EVT::getVectorVT(*DAG.getContext(),
+ Mask.getValueType().getVectorElementType(),
+ WideVecVT.getVectorNumElements());
+
+ SDValue WideVec = ModifyToType(Vec, WideVecVT);
+ SDValue WideMask = ModifyToType(Mask, WideMaskVT);
----------------
efriedma-quic wrote:
Do you need to pass FillWithZeros=true for the mask?
https://github.com/llvm/llvm-project/pull/92289
More information about the llvm-commits
mailing list