Remove a unsafe optimization. This fixes 401.bzip2.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 4 Dec 2007 23:57:55 +0000 (23:57 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 4 Dec 2007 23:57:55 +0000 (23:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44587 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/VirtRegMap.cpp

index a375a7b49850e6f4b8b6b37c63a52b8638e914d0..58fc40b21748bb1e34b9c873bdd0513f6439f011 100644 (file)
@@ -1040,14 +1040,6 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
 
       // Check to see if this stack slot is available.
       unsigned PhysReg = Spills.getSpillSlotOrReMatPhysReg(SSorRMId);
-      if (!PhysReg && DoReMat) {
-        // This use is rematerializable. But perhaps the value is available in
-        // a register if the definition is not deleted. If so, check if we can
-        // reuse the value.
-        ReuseSlot = VRM.getStackSlot(VirtReg);
-        if (ReuseSlot != VirtRegMap::NO_STACK_SLOT)
-          PhysReg = Spills.getSpillSlotOrReMatPhysReg(ReuseSlot);
-      }
 
       // If this is a sub-register use, make sure the reuse register is in the
       // right register class. For example, for x86 not all of the 32-bit