[llvm] [IR][PatternMatch] Only accept poison in getSplatValue() (PR #89159)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 01:51:03 PDT 2024


================
@@ -433,7 +433,7 @@ template <typename Predicate> struct apf_pred_ty : public Predicate {
     if (V->getType()->isVectorTy())
       if (const auto *C = dyn_cast<Constant>(V))
         if (auto *CI = dyn_cast_or_null<ConstantFP>(
-                C->getSplatValue(/* AllowUndef */ true)))
+                C->getSplatValue(/* AllowPoison */ true)))
----------------
nikic wrote:

The usage in foldSelectICmpAndBinOp is fine after all. I submitted https://github.com/llvm/llvm-project/pull/89188 to get the discussion going on this, not sure whether our current test coverage will be a blocker for this or not.

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


More information about the llvm-commits mailing list