mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[ValueTracking] Let isGuaranteedToBeUndefOrPoison look into operands of icmp
This commit is contained in:
parent
fe51389b82
commit
d3ab7b3c38
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user