[llvm] d46fa1f - [ArgumentPromotion] use poison when replacing dead instructions instead of undef [NFC]
Nuno Lopes via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 26 05:44:13 PDT 2022
Author: Nuno Lopes
Date: 2022-06-26T13:44:05+01:00
New Revision: d46fa1fc58b4339eee913384270dd6e8649afc6c
URL: https://github.com/llvm/llvm-project/commit/d46fa1fc58b4339eee913384270dd6e8649afc6c
DIFF: https://github.com/llvm/llvm-project/commit/d46fa1fc58b4339eee913384270dd6e8649afc6c.diff
LOG: [ArgumentPromotion] use poison when replacing dead instructions instead of undef [NFC]
Added:
Modified:
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index bf769ec62c30..913c7146b954 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -431,7 +431,7 @@ static Function *doPromotion(
}
for (Instruction *I : DeadInsts) {
- I->replaceAllUsesWith(UndefValue::get(I->getType()));
+ I->replaceAllUsesWith(PoisonValue::get(I->getType()));
I->eraseFromParent();
}
}
More information about the llvm-commits
mailing list