[ValueTracking] Let isGuaranteedToBeUndefOrPoison look into operands of icmp

This commit is contained in:
Juneyoung Lee 2020-02-04 17:16:32 +09:00
parent fe51389b82
commit d3ab7b3c38

View File

@ -4529,6 +4529,13 @@ bool llvm::isGuaranteedNotToBeUndefOrPoison(const Value *V) {
return true;
}
if (auto II = dyn_cast<ICmpInst>(V)) {
if (llvm::all_of(II->operands(), [](const Value *V) {
return isGuaranteedNotToBeUndefOrPoison(V);
}))
return true;
}
return false;
}