[llvm] [DAG] SimplifyDemandedVectorElts - add handling for INT<->FP conversions (PR #117884)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 01:50:26 PST 2024


================
@@ -3736,6 +3736,14 @@ bool TargetLowering::SimplifyDemandedVectorElts(
       KnownUndef.clearAllBits();
     }
     break;
+  case ISD::SINT_TO_FP:
+  case ISD::UINT_TO_FP:
+  case ISD::FP_TO_SINT:
+  case ISD::FP_TO_UINT:
+    if (SimplifyDemandedVectorElts(Op.getOperand(0), DemandedElts, KnownUndef,
+                                   KnownZero, TLO, Depth + 1))
+      return true;
+    break;
----------------
RKSimon wrote:

Nice catch - int2fp should fold undef to zero - I'll just early out for now

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


More information about the llvm-commits mailing list