From cbeaa8b0e2b0c001059741d957620a925f76a802 Mon Sep 17 00:00:00 2001 From: Scott Linder Date: Thu, 21 Jun 2018 18:48:48 +0000 Subject: [PATCH] [AMDGPU] Fix bug with tracking processed blocks in SIInsertWaitcnts BlockWaitcntProcessedSet was not being cleared between calls, so it was producing incorrect counts in cases where MBB addresses happened to coincide across multiple calls. Differential Revision: https://reviews.llvm.org/D48391 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335268 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/lib/Target/AMDGPU/SIInsertWaitcnts.cpp index fb24d528c33..7f750989376 100644 --- a/lib/Target/AMDGPU/SIInsertWaitcnts.cpp +++ b/lib/Target/AMDGPU/SIInsertWaitcnts.cpp @@ -1868,6 +1868,7 @@ bool SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) { BlockVisitedSet.clear(); VCCZBugHandledSet.clear(); LoopWaitcntDataMap.clear(); + BlockWaitcntProcessedSet.clear(); // Walk over the blocks in reverse post-dominator order, inserting // s_waitcnt where needed.