forked from OSchip/llvm-project
[ValueTracking] Make isGuaranteedNotToBeUndefOrPoison exit early when MetadataAsValue is given
It is set to conservatively return false, otherwise noundef attributes are added to function calls with metadata arguments.
This commit is contained in:
parent
1c45220028
commit
92106641ae
|
@ -4881,6 +4881,9 @@ static bool isGuaranteedNotToBeUndefOrPoison(const Value *V,
|
|||
if (Depth >= MaxAnalysisRecursionDepth)
|
||||
return false;
|
||||
|
||||
if (isa<MetadataAsValue>(V))
|
||||
return false;
|
||||
|
||||
if (const auto *A = dyn_cast<Argument>(V)) {
|
||||
if (A->hasAttribute(Attribute::NoUndef))
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue