[llvm] [LLVM][SelectionDAG] Remove scalable vector restriction from poison analysis. (PR #102504)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 11:05:03 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(
----------------
topperc wrote:
SimplifyDemandedBits does the same thing but writes it as
```
APInt DemandedElts = VT.isFixedLengthVector()
? APInt::getAllOnes(VT.getVectorNumElements())
: APInt(1, 1);
```
https://github.com/llvm/llvm-project/pull/102504
More information about the llvm-commits
mailing list