Skip to content

Commit df9f479

Browse files
committed
[IR] Use poison instead of undef for self-referential phi
1 parent 3402620 commit df9f479

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/IR/Instructions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Value *PHINode::hasConstantValue() const {
205205
ConstantValue = getIncomingValue(i);
206206
}
207207
if (ConstantValue == this)
208-
return UndefValue::get(getType());
208+
return PoisonValue::get(getType());
209209
return ConstantValue;
210210
}
211211

0 commit comments

Comments
 (0)