diff options
author | Philip Reames <listmail@philipreames.com> | 2019-11-22 11:37:04 -0800 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2019-11-22 11:37:17 -0800 |
commit | 3f8a2af8f43faf6da15070108ceeacb9a5d2c42b (patch) | |
tree | 81a5b2d55ab5c88746e4fe654e7faed45dc3ae69 /llvm/lib/Analysis/GuardUtils.cpp | |
parent | e1e7b6f381a9a5640605fdc4a3e78eb01f8fc8b9 (diff) | |
download | bcm5719-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.cpp | 5 |
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()) { |