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

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 23 17:22:51 PDT 2026


================
@@ -1270,6 +1271,10 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
     setOperationAction(ISD::FP_TO_UINT,         MVT::v2i32, Custom);
     setOperationAction(ISD::STRICT_FP_TO_SINT,  MVT::v4i32, Custom);
     setOperationAction(ISD::STRICT_FP_TO_SINT,  MVT::v2i32, Custom);
+    if (!Subtarget.hasAVX10_2()) {
+      setOperationAction(ISD::FP_TO_SINT_SAT, MVT::v4i32, Custom);
+      setOperationAction(ISD::FP_TO_UINT_SAT, MVT::v4i32, Custom);
+    }
----------------
phoebewang wrote:

Move these into `if (Subtarget.hasSSE2())` block. Then `!Subtarget.hasAVX10_2()` in not needed.

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


More information about the llvm-commits mailing list