Skip to content

Commit 11efb03

Browse files
committed
Replace llvm_unreachable with conservative nullptr return to handle potential equality predicates
1 parent e9aba12 commit 11efb03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4971,7 +4971,7 @@ static Instruction *foldICmpXorXX(ICmpInst &I, const SimplifyQuery &Q,
49714971
CmpInst::Predicate NewPred;
49724972
switch (ICmpInst::getStrictPredicate(Pred)) {
49734973
default:
4974-
llvm_unreachable("not a valid predicate");
4974+
return nullptr;
49754975
case ICmpInst::ICMP_SLT:
49764976
case ICmpInst::ICMP_UGT:
49774977
NewPred = ICmpInst::ICMP_SLT;

0 commit comments

Comments
 (0)