diff --git a/source/reduce/change_operand_to_undef_reduction_opportunity.cpp b/source/reduce/change_operand_to_undef_reduction_opportunity.cpp index 8e33da66..7cc06a03 100644 --- a/source/reduce/change_operand_to_undef_reduction_opportunity.cpp +++ b/source/reduce/change_operand_to_undef_reduction_opportunity.cpp @@ -35,6 +35,7 @@ void ChangeOperandToUndefReductionOpportunity::Apply() { assert(operand_type_id); auto undef_id = FindOrCreateGlobalUndef(context_, operand_type_id); inst_->SetOperand(operand_index_, {undef_id}); + context_->InvalidateAnalyses(opt::IRContext::kAnalysisDefUse); } } // namespace reduce