diff options
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index b2f105f..c0f41c7 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -4794,6 +4794,14 @@ static bool canCreateUndefOrPoison(const Operator *Op, bool PoisonOnly) { // destination type. return true; case Instruction::Call: + if (auto *II = dyn_cast<IntrinsicInst>(Op)) { + switch (II->getIntrinsicID()) { + // TODO: Add more intrinsics. + case Intrinsic::ctpop: + return false; + } + } + LLVM_FALLTHROUGH; case Instruction::CallBr: case Instruction::Invoke: { const auto *CB = cast<CallBase>(Op); |