[llvm] daa98ac - inline assert-only variable from 17a17fa (#177602)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 23 08:26:55 PST 2026


Author: Lily Gorsheneva
Date: 2026-01-23T16:26:50Z
New Revision: daa98ac40a010d19150d0256827075eb3b6eb45e

URL: https://github.com/llvm/llvm-project/commit/daa98ac40a010d19150d0256827075eb3b6eb45e
DIFF: https://github.com/llvm/llvm-project/commit/daa98ac40a010d19150d0256827075eb3b6eb45e.diff

LOG: inline assert-only variable from 17a17fa (#177602)

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/PredicateInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp
index df32482f948f0..79ef0a608b35e 100644
--- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp
+++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp
@@ -726,8 +726,7 @@ PredicateInfo::PredicateInfo(Function &F, DominatorTree &DT,
 std::optional<PredicateConstraint> PredicateBase::getConstraint() const {
   switch (Type) {
   case PT_BundleAssume: {
-    auto *BA = cast<PredicateBundleAssume>(this);
-    assert(BA->AttrKind == Attribute::NonNull &&
+    assert(cast<PredicateBundleAssume>(this)->AttrKind == Attribute::NonNull &&
            "Cannot handle anything other than NonNull");
     return {{CmpInst::ICMP_NE, ConstantPointerNull::get(
                                    cast<PointerType>(OriginalOp->getType()))}};


        


More information about the llvm-commits mailing list