Skip to content

Commit 9865296

Browse files
authored
[StructurizeCFG] Use poison instead of undef as placeholder [NFC] (#119137)
1 parent ecbf64d commit 9865296

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/StructurizeCFG.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,8 @@ void StructurizeCFG::delPhiValues(BasicBlock *From, BasicBlock *To) {
686686
/// Add a dummy PHI value as soon as we knew the new predecessor
687687
void StructurizeCFG::addPhiValues(BasicBlock *From, BasicBlock *To) {
688688
for (PHINode &Phi : To->phis()) {
689-
Value *Undef = UndefValue::get(Phi.getType());
690-
Phi.addIncoming(Undef, From);
689+
Value *Poison = PoisonValue::get(Phi.getType());
690+
Phi.addIncoming(Poison, From);
691691
}
692692
AddedPhis[To].push_back(From);
693693
}

0 commit comments

Comments
 (0)