From e6cd757e6800b9b94a6459ec148c0624c4f2e3c1 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 13 May 2010 20:34:42 +0000 Subject: Teach MachineLICM and MachineSink how to clear kill flags conservatively when they move instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103737 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineSink.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/CodeGen/MachineSink.cpp') diff --git a/lib/CodeGen/MachineSink.cpp b/lib/CodeGen/MachineSink.cpp index ef489dc556..1610e6c961 100644 --- a/lib/CodeGen/MachineSink.cpp +++ b/lib/CodeGen/MachineSink.cpp @@ -314,5 +314,10 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) { // Move the instruction. SuccToSinkTo->splice(InsertPos, ParentBlock, MI, ++MachineBasicBlock::iterator(MI)); + + // Conservatively, clear any kill flags, since it's possible that + // they are no longer correct. + MI->clearKillInfo(); + return true; } -- cgit v1.2.3-18-g5258