diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp index 80a7529002ac9..b2cfc3f317256 100644 --- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp +++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp @@ -2598,6 +2598,7 @@ bool SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) { Modified = true; } ReleaseVGPRInsts.clear(); + PreheadersToFlush.clear(); SLoadAddresses.clear(); return Modified;