diff --git a/src/ir_opt/verification_pass.cpp b/src/ir_opt/verification_pass.cpp index ed99e127..59f474b3 100644 --- a/src/ir_opt/verification_pass.cpp +++ b/src/ir_opt/verification_pass.cpp @@ -31,8 +31,9 @@ void VerificationPass(const IR::Block& block) { std::map actual_uses; for (const auto& inst : block) { for (size_t i = 0; i < inst.NumArgs(); i++) { - if (!inst.GetArg(i).IsImmediate()) { - actual_uses[inst.GetArg(i).GetInst()]++; + const auto arg = inst.GetArg(i); + if (!arg.IsImmediate()) { + actual_uses[arg.GetInst()]++; } } }