From 40f68c968ef84b08cbfa1c99c204c61d6861d572 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 15 Nov 2011 06:26:51 +0000 Subject: [PATCH] Set SeenStore to true to prevent loads from being moved; also eliminates a non-deterministic behavior. llvm-svn: 144628 --- lib/CodeGen/TwoAddressInstructionPass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index 67963126491..e2fd0076cd3 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -924,7 +924,7 @@ TwoAddressInstructionPass::RescheduleMIBelowKill(MachineBasicBlock *MBB, if (isTwoAddrUse(*KillMI, Reg, DstReg)) return false; - bool SeenStore; + bool SeenStore = true; if (!MI->isSafeToMove(TII, AA, SeenStore)) return false; @@ -1071,7 +1071,7 @@ TwoAddressInstructionPass::RescheduleKillAboveMI(MachineBasicBlock *MBB, if (isTwoAddrUse(*KillMI, Reg, DstReg)) return false; - bool SeenStore; + bool SeenStore = true; if (!KillMI->isSafeToMove(TII, AA, SeenStore)) return false;