From 5792dd0f391a57772c7603e14226b0a99032ad87 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 llvm-svn: 335268 --- llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp index fb24d528c338..7f7509893760 100644 --- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp +++ b/llvm/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.