[llvm] [LLVM][SelectionDAG] Remove scalable vector restriction from poison analysis. (PR #102504)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 02:53:27 PDT 2024


================
@@ -5140,14 +5140,11 @@ bool SelectionDAG::isGuaranteedNotToBeUndefOrPoison(SDValue Op, bool PoisonOnly,
   if (Op.getOpcode() == ISD::FREEZE)
     return true;
 
-  // TODO: Assume we don't know anything for now.
   EVT VT = Op.getValueType();
-  if (VT.isScalableVector())
-    return false;
-
-  APInt DemandedElts = VT.isVector()
-                           ? APInt::getAllOnes(VT.getVectorNumElements())
-                           : APInt(1, 1);
+  APInt DemandedElts =
+      VT.isVector() ? APInt::getAllOnes(
----------------
paulwalker-arm wrote:

That's nicer, thanks, I'll copy that version instead.

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


More information about the llvm-commits mailing list