[llvm] [IR] Teach `drop/hasPoisonGeneratingAnnotations()` about `abs`, `ctlz` and `cttz` (PR #175941)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 14 07:50:07 PST 2026
================
@@ -473,6 +473,19 @@ void Instruction::dropPoisonGeneratingFlags() {
case Instruction::ICmp:
cast<ICmpInst>(this)->setSameSign(false);
break;
+
+ case Instruction::Call: {
+ if (auto *II = dyn_cast<IntrinsicInst>(this)) {
+ switch (II->getIntrinsicID()) {
+ case Intrinsic::ctlz:
+ case Intrinsic::cttz:
+ case Intrinsic::abs:
+ II->setOperand(1, ConstantInt::getFalse(this->getContext()));
----------------
dtcxzyw wrote:
Can we drop `this->`?
https://github.com/llvm/llvm-project/pull/175941
More information about the llvm-commits
mailing list