Skip to content

Commit 9b8c3c6

Browse files
committed
[InstSimplify] Use poison instead of undef for unreachable inst
1 parent 605e184 commit 9b8c3c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7155,7 +7155,7 @@ Value *llvm::simplifyInstruction(Instruction *I, const SimplifyQuery &SQ) {
71557155
/// If called on unreachable code, the instruction may simplify to itself.
71567156
/// Make life easier for users by detecting that case here, and returning a
71577157
/// safe value instead.
7158-
return Result == I ? UndefValue::get(I->getType()) : Result;
7158+
return Result == I ? PoisonValue::get(I->getType()) : Result;
71597159
}
71607160

71617161
/// Implementation of recursive simplification through an instruction's

0 commit comments

Comments
 (0)