From 7c94599d1b34fbe3a3857edf41946dc62f9cfba2 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 13 Nov 2013 23:58:51 +0000 Subject: [PATCH] R600: Fix uninitialized variable usage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194632 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/SIInstrInfo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Target/R600/SIInstrInfo.cpp b/lib/Target/R600/SIInstrInfo.cpp index b4380d07999..e293c3a22ae 100644 --- a/lib/Target/R600/SIInstrInfo.cpp +++ b/lib/Target/R600/SIInstrInfo.cpp @@ -656,18 +656,18 @@ void SIInstrInfo::reserveIndirectRegisters(BitVector &Reserved, for (int Index = Begin; Index <= End; ++Index) Reserved.set(AMDGPU::VReg_32RegClass.getRegister(Index)); - for (int Index = std::max(0, Index - 1); Index <= End; ++Index) + for (int Index = std::max(0, Begin - 1); Index <= End; ++Index) Reserved.set(AMDGPU::VReg_64RegClass.getRegister(Index)); - for (int Index = std::max(0, Index - 2); Index <= End; ++Index) + for (int Index = std::max(0, Begin - 2); Index <= End; ++Index) Reserved.set(AMDGPU::VReg_96RegClass.getRegister(Index)); - for (int Index = std::max(0, Index - 3); Index <= End; ++Index) + for (int Index = std::max(0, Begin - 3); Index <= End; ++Index) Reserved.set(AMDGPU::VReg_128RegClass.getRegister(Index)); - for (int Index = std::max(0, Index - 7); Index <= End; ++Index) + for (int Index = std::max(0, Begin - 7); Index <= End; ++Index) Reserved.set(AMDGPU::VReg_256RegClass.getRegister(Index)); - for (int Index = std::max(0, Index - 15); Index <= End; ++Index) + for (int Index = std::max(0, Begin - 15); Index <= End; ++Index) Reserved.set(AMDGPU::VReg_512RegClass.getRegister(Index)); } -- 2.11.0