[llvm] [LLVM] Add `llvm.masked.compress` intrinsic (PR #92289)
Lawrence Benson via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 08:00:46 PDT 2024
================
@@ -11226,6 +11226,53 @@ SDValue TargetLowering::expandVectorSplice(SDNode *Node,
MachinePointerInfo::getUnknownStack(MF));
}
+SDValue TargetLowering::expandMCOMPRESS(SDNode *Node, SelectionDAG &DAG) const {
+ SDLoc DL(Node);
+ SDValue Vec = Node->getOperand(0);
+ SDValue Mask = Node->getOperand(1);
+
+ EVT VecVT = Vec.getValueType();
+ EVT ScalarVT = VecVT.getScalarType();
+ EVT MaskScalarVT = Mask.getValueType().getScalarType();
+
+ if (VecVT.isScalableVector())
+ report_fatal_error(
+ "Expanding masked_compress for scalable vectors is undefined.");
----------------
lawben wrote:
I've changed the error message to be a bit more clear. My understanding is that we need target-specific custom lowering for SVE and RISCV.
https://github.com/llvm/llvm-project/pull/92289
More information about the llvm-commits
mailing list