diff options
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 6b88cd0..5b4c810 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -4529,6 +4529,13 @@ bool llvm::isGuaranteedNotToBeUndefOrPoison(const Value *V) { return true; } + if (auto II = dyn_cast<ICmpInst>(V)) { + if (llvm::all_of(II->operands(), [](const Value *V) { + return isGuaranteedNotToBeUndefOrPoison(V); + })) + return true; + } + return false; } |