Skip to content

Commit dd7d610

Browse files
committed
[ValueTracking] Let isGuaranteedToBeUndefOrPoison look into operands of icmp
1 parent 36272d5 commit dd7d610

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/Analysis/ValueTracking.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -4529,6 +4529,13 @@ bool llvm::isGuaranteedNotToBeUndefOrPoison(const Value *V) {
45294529
return true;
45304530
}
45314531

4532+
if (auto II = dyn_cast<ICmpInst>(V)) {
4533+
if (llvm::all_of(II->operands(), [](const Value *V) {
4534+
return isGuaranteedNotToBeUndefOrPoison(V);
4535+
}))
4536+
return true;
4537+
}
4538+
45324539
return false;
45334540
}
45344541

0 commit comments

Comments
 (0)