diff options
-rw-r--r-- | lib/Target/AMDGPU/SILowerFlowControl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/AMDGPU/SILowerFlowControl.cpp b/lib/Target/AMDGPU/SILowerFlowControl.cpp index 7ddb1df2c59..62b059f74af 100644 --- a/lib/Target/AMDGPU/SILowerFlowControl.cpp +++ b/lib/Target/AMDGPU/SILowerFlowControl.cpp @@ -93,12 +93,12 @@ FunctionPass *llvm::createSILowerFlowControlPass(TargetMachine &tm) { bool SILowerFlowControlPass::runOnMachineFunction(MachineFunction &MF) { // Find all the unused registers that can be used for the predicate stack. - for (TargetRegisterClass::iterator S = AMDGPU::SReg_64RegClass.begin(), - I = AMDGPU::SReg_64RegClass.end(); - I != S; --I) { + for (TargetRegisterClass::iterator I = AMDGPU::SReg_64RegClass.begin(), + S = AMDGPU::SReg_64RegClass.end(); + I != S; ++I) { unsigned Reg = *I; if (!MF.getRegInfo().isPhysRegOrOverlapUsed(Reg)) { - UnusedRegisters.push_back(Reg); + UnusedRegisters.insert(UnusedRegisters.begin(), Reg); } } |