summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-11-13 23:58:51 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-11-13 23:58:51 +0000
commit415ef6db6877c989087cc631c279d4452710b2a6 (patch)
tree5b6a064c085d6654e8c0953d0c6845455424db0c
parent5d719f27447b5b67b48726a7b8f3d5888ea0d93e (diff)
downloadbcm5719-llvm-415ef6db6877c989087cc631c279d4452710b2a6.tar.gz
bcm5719-llvm-415ef6db6877c989087cc631c279d4452710b2a6.zip
R600: Fix uninitialized variable usage
llvm-svn: 194632
-rw-r--r--llvm/lib/Target/R600/SIInstrInfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/R600/SIInstrInfo.cpp b/llvm/lib/Target/R600/SIInstrInfo.cpp
index b4380d07999..e293c3a22ae 100644
--- a/llvm/lib/Target/R600/SIInstrInfo.cpp
+++ b/llvm/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));
}
OpenPOWER on IntegriCloud