diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp b/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp index aed84437b890..85de3a548411 100644 --- a/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp +++ b/llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp @@ -226,7 +226,7 @@ bool SIOptimizeExecMaskingPreRA::optimizeVcndVcmpPair(MachineBasicBlock &MBB) { auto DefSegment = SelLI->FindSegmentContaining(SelIdx.getRegSlot()); assert(DefSegment != SelLI->end() && "No live interval segment covering definition?"); - for (auto I = DefSegment; I != SelLI->end(); ++I) { + for (auto I = DefSegment; I != SelLI->end() && I->start <= AndIdx; ++I) { SlotIndex Start = I->start < SelIdx.getRegSlot() ? SelIdx.getRegSlot() : I->start; SlotIndex End = I->end < AndIdx.getRegSlot() || I->end.isBlock() ? |