diff options
Diffstat (limited to 'llvm/lib/MCA/HardwareUnits/Scheduler.cpp')
| -rw-r--r-- | llvm/lib/MCA/HardwareUnits/Scheduler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MCA/HardwareUnits/Scheduler.cpp b/llvm/lib/MCA/HardwareUnits/Scheduler.cpp index c7091203595..0f0f2ffb832 100644 --- a/llvm/lib/MCA/HardwareUnits/Scheduler.cpp +++ b/llvm/lib/MCA/HardwareUnits/Scheduler.cpp @@ -198,7 +198,8 @@ InstRef Scheduler::select() { Strategy->compare(IR, ReadySet[QueueIndex])) { Instruction &IS = *IR.getInstruction(); uint64_t BusyResourceMask = Resources->checkAvailability(IS.getDesc()); - IS.setCriticalResourceMask(BusyResourceMask); + if (BusyResourceMask) + IS.setCriticalResourceMask(BusyResourceMask); BusyResourceUnits |= BusyResourceMask; if (!BusyResourceMask) QueueIndex = I; |

