[llvm] [X86][SSE] Improve ISD::FP_TO_*INT_SAT vector lowering (PR #199416)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 03:40:35 PDT 2026


================
@@ -22541,8 +22547,179 @@ SDValue X86TargetLowering::LRINT_LLRINTHelper(SDNode *N,
   return DAG.getLoad(DstVT, DL, Chain, StackPtr, MPI);
 }
 
-SDValue
-X86TargetLowering::LowerFP_TO_INT_SAT(SDValue Op, SelectionDAG &DAG) const {
+static SDValue lowerVectorFP_TO_INT_SAT(SDValue Op, SelectionDAG &DAG,
+                                        const X86Subtarget &Subtarget) {
+  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
+  SDNode *Node = Op.getNode();
+  bool IsSigned = Node->getOpcode() == ISD::FP_TO_SINT_SAT;
+  SDLoc dl(SDValue(Node, 0));
+  SDValue Src = Node->getOperand(0);
+  EVT SrcVT = Src.getValueType();
+  EVT DstVT = Node->getValueType(0);
----------------
RKSimon wrote:

You should be able to use MVT types for SrcVT/DstVT in lowering.

https://github.com/llvm/llvm-project/pull/199416


More information about the llvm-commits mailing list