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

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 20:51:36 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)))
----------------
goldsteinn wrote:

Should we default the corresponding `api_pred_ty` to true?

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


More information about the llvm-commits mailing list