summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/GuardUtils.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-11-22 11:37:04 -0800
committerPhilip Reames <listmail@philipreames.com>2019-11-22 11:37:17 -0800
commit3f8a2af8f43faf6da15070108ceeacb9a5d2c42b (patch)
tree81a5b2d55ab5c88746e4fe654e7faed45dc3ae69 /llvm/lib/Analysis/GuardUtils.cpp
parente1e7b6f381a9a5640605fdc4a3e78eb01f8fc8b9 (diff)
downloadbcm5719-llvm-3f8a2af8f43faf6da15070108ceeacb9a5d2c42b.tar.gz
bcm5719-llvm-3f8a2af8f43faf6da15070108ceeacb9a5d2c42b.zip
Slightly speculative buildbot fix for issue reported in 8293f74 commit thread
Diffstat (limited to 'llvm/lib/Analysis/GuardUtils.cpp')
-rw-r--r--llvm/lib/Analysis/GuardUtils.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/GuardUtils.cpp b/llvm/lib/Analysis/GuardUtils.cpp
index 18141069f6a..d4828327985 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()) {
OpenPOWER on IntegriCloud