Set SetStore to false, to allow this pass to delete
authorDan Gohman <gohman@apple.com>
Wed, 24 Sep 2008 00:07:08 +0000 (00:07 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 24 Sep 2008 00:07:08 +0000 (00:07 +0000)
dead loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56529 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DeadMachineInstructionElim.cpp

index c3cdbf02597f6d812038ab6d386fd020a3299091..392e3b1b778067841eaadc23ccc1fc92c01d519f 100644 (file)
@@ -46,7 +46,7 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
   const MachineRegisterInfo &MRI = MF.getRegInfo();
   const TargetInstrInfo &TII = *MF.getTarget().getInstrInfo();
   BitVector LivePhysRegs;
-  bool SawStore = true;
+  bool SawStore;
 
   // Compute a bitvector to represent all non-allocatable physregs.
   BitVector NonAllocatableRegs = TRI.getAllocatableSet(MF);
@@ -79,6 +79,7 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
       MachineInstr *MI = &*MII;
 
       // Don't delete instructions with side effects.
+      SawStore = false;
       if (MI->isSafeToMove(&TII, SawStore)) {
         // Examine each operand.
         bool AllDefsDead = true;