Slightly speculative buildbot fix for issue reported in 8293f74 commit thread
authorPhilip Reames <listmail@philipreames.com>
Fri, 22 Nov 2019 19:37:04 +0000 (11:37 -0800)
committerPhilip Reames <listmail@philipreames.com>
Fri, 22 Nov 2019 19:37:17 +0000 (11:37 -0800)
llvm/lib/Analysis/GuardUtils.cpp

index 1814106..d482832 100644 (file)
@@ -84,7 +84,10 @@ bool llvm::parseWidenableBranch(User *U, Use *&C,Use *&WC,
   Value *A, *B;
   if (!match(Cond, m_And(m_Value(A), m_Value(B))))
     return false;
-  auto *And = cast<Instruction>(Cond);
+  auto *And = dyn_cast<Instruction>(Cond);
+  if (!And)
+    // Could be a constexpr
+    return false;
   
   if (match(A, m_Intrinsic<Intrinsic::experimental_widenable_condition>()) &&
       A->hasOneUse()) {