diff options
Diffstat (limited to 'lib/CodeGen/RegAllocSimple.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocSimple.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp index 081edd8d5e..f07f7f92be 100644 --- a/lib/CodeGen/RegAllocSimple.cpp +++ b/lib/CodeGen/RegAllocSimple.cpp @@ -103,10 +103,9 @@ namespace { int RegAllocSimple::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) { // Find the location VirtReg would belong... - std::map<unsigned, int>::iterator I = - StackSlotForVirtReg.lower_bound(VirtReg); + std::map<unsigned, int>::iterator I = StackSlotForVirtReg.find(VirtReg); - if (I != StackSlotForVirtReg.end() && I->first == VirtReg) + if (I != StackSlotForVirtReg.end()) return I->second; // Already has space allocated? // Allocate a new stack object for this spill location... |