diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -4551,6 +4551,13 @@ return true; } + if (auto I = dyn_cast(V)) { + if (programUndefinedIfFullPoison(I) && I->getType()->isIntegerTy(1)) + // Note: once we have an agreement that poison is a value-wise concept, + // we can remove the isIntegerTy(1) constraint. + return true; + } + return false; }