[llvm] 3f8a2af - Slightly speculative buildbot fix for issue reported in 8293f74 commit thread
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 11:37:22 PST 2019
Author: Philip Reames
Date: 2019-11-22T11:37:17-08:00
New Revision: 3f8a2af8f43faf6da15070108ceeacb9a5d2c42b
URL: https://github.com/llvm/llvm-project/commit/3f8a2af8f43faf6da15070108ceeacb9a5d2c42b
DIFF: https://github.com/llvm/llvm-project/commit/3f8a2af8f43faf6da15070108ceeacb9a5d2c42b.diff
LOG: Slightly speculative buildbot fix for issue reported in 8293f74 commit thread
Added:
Modified:
llvm/lib/Analysis/GuardUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/GuardUtils.cpp b/llvm/lib/Analysis/GuardUtils.cpp
index 18141069f6a4..d48283279858 100644
--- a/llvm/lib/Analysis/GuardUtils.cpp
+++ b/llvm/lib/Analysis/GuardUtils.cpp
@@ -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()) {
More information about the llvm-commits
mailing list