[llvm] [InstCombine] Swap out range metadata to range attribute for cttz/ctlz/ctpop (PR #88776)
Andreas Jonson via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 11:55:53 PDT 2024
================
@@ -450,6 +452,10 @@ void Instruction::dropPoisonGeneratingFlags() {
cast<TruncInst>(this)->setHasNoUnsignedWrap(false);
cast<TruncInst>(this)->setHasNoSignedWrap(false);
break;
+
+ case Instruction::Call:
+ case Instruction::Invoke:
+ cast<CallBase>(this)->removeRetAttr(Attribute::Range);
----------------
andjo403 wrote:
this only remove the attribute from the Call/Invoke instruction but Operator::hasPoisonGeneratingFlags() will also look at the callee for the attribute I do not know how to handle this as there is an assert in the end of this function that they shall be in sync.
https://github.com/llvm/llvm-project/pull/88776
More information about the llvm-commits
mailing list