[llvm] 9f90669 - [SimplifyCFG] Use poison instead of undef as placeholder [NFC]
Nuno Lopes via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 22 04:44:27 PDT 2023
Author: Nuno Lopes
Date: 2023-07-22T12:44:21+01:00
New Revision: 9f90669571e3c47dd51255720349b3c6566962e3
URL: https://github.com/llvm/llvm-project/commit/9f90669571e3c47dd51255720349b3c6566962e3
DIFF: https://github.com/llvm/llvm-project/commit/9f90669571e3c47dd51255720349b3c6566962e3.diff
LOG: [SimplifyCFG] Use poison instead of undef as placeholder [NFC]
This is used in a phi node that is created for which only 1 value is accessed (the non-poison)
Added:
Modified:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 508a77a43dbfa0..d3a9a41aef1533 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -3872,7 +3872,7 @@ static Value *ensureValueAvailableInSuccessor(Value *V, BasicBlock *BB,
for (BasicBlock *PredBB : predecessors(Succ))
if (PredBB != BB)
PHI->addIncoming(
- AlternativeV ? AlternativeV : UndefValue::get(V->getType()), PredBB);
+ AlternativeV ? AlternativeV : PoisonValue::get(V->getType()), PredBB);
return PHI;
}
More information about the llvm-commits
mailing list