Skip to content

Commit 72867f3

Browse files
Merge pull request #79924 from rastogishubham/DroppedVarStatsFix
Fix bug in dropped variable statistics for SIL.
2 parents d5fecf1 + b80045a commit 72867f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Utils/OptimizerStatsUtils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ int computeLostVariables(SILFunction *F, FunctionStat &Old, FunctionStat &New) {
782782
auto &DbgValScope = std::get<0>(Var);
783783
for (auto &BB : *F) {
784784
for (auto &I : BB) {
785-
if (I.isDebugInstruction()) {
785+
if (!I.isDebugInstruction()) {
786786
auto DbgLoc = I.getDebugLocation();
787787
auto Scope = DbgLoc.getScope();
788788
// If the Scope is a child of, or equal to the DbgValScope and is

0 commit comments

Comments
 (0)