[llvm] [X86][SSE] Improve ISD::FP_TO_*INT_SAT vector lowering (PR #199416)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 23 19:47:21 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);
+ }
----------------
Panadulek wrote:
we set operation as legal in if if (Subtarget.hasAVX10_2()) which is in 325 line.
if (!Subtarget.useSoftFloat() && Subtarget.hasAVX()) 1492 line.
So how i understand when code mark operations ISD::FP_TO_UINT_SAT and ISD::FP_TO_SINT_SAT as legal then code which is in if for hasAVX will make those operations as custom. So we will get regression for avx10_2.
https://github.com/llvm/llvm-project/pull/199416
More information about the llvm-commits
mailing list