[llvm] [X86][AVX10.2] Map vector saturated converts to public intrinsics (PR #121483)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 4 04:50:08 PST 2025
================
@@ -33665,6 +33676,27 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N,
}
return;
}
+ case ISD::FP_TO_SINT_SAT:
+ case ISD::FP_TO_UINT_SAT: {
+ if (!Subtarget.hasAVX10_2())
+ return;
+
+ bool IsSigned = Opc == ISD::FP_TO_SINT_SAT;
+ EVT VT = N->getValueType(0);
+ SDValue Op = N->getOperand(0);
+ EVT OpVT = Op.getValueType();
+ SDValue Res;
+
+ if (VT == MVT::v2i32 && OpVT == MVT::v2f64) {
+ if (IsSigned)
+ Res = DAG.getNode(X86ISD::FP_TO_SINT_SAT, dl, MVT::v4i32, Op);
+ else
+ Res = DAG.getNode(X86ISD::FP_TO_UINT_SAT, dl, MVT::v4i32, Op);
+ Results.push_back(Res);
+ return;
+ }
+ break;
----------------
phoebewang wrote:
return
https://github.com/llvm/llvm-project/pull/121483
More information about the llvm-commits
mailing list