forked from OSchip/llvm-project
[Profile] Do not annotate select insts not covered in profile.
Fixed PR/30466 llvm-svn: 282009
This commit is contained in:
parent
fc0929adb8
commit
c7368287b7
|
@ -967,7 +967,8 @@ void SelectInstVisitor::annotateOneSelectInst(SelectInst &SI) {
|
|||
// False Count
|
||||
SCounts[1] = (TotalCount > SCounts[0] ? TotalCount - SCounts[0] : 0);
|
||||
uint64_t MaxCount = std::max(SCounts[0], SCounts[1]);
|
||||
setProfMetadata(F.getParent(), &SI, SCounts, MaxCount);
|
||||
if (MaxCount)
|
||||
setProfMetadata(F.getParent(), &SI, SCounts, MaxCount);
|
||||
}
|
||||
|
||||
void SelectInstVisitor::visitSelectInst(SelectInst &SI) {
|
||||
|
|
Loading…
Reference in New Issue