From: Juergen Ributzka Date: Thu, 4 Sep 2014 02:07:36 +0000 (+0000) Subject: Revert r216803 "[MachineSinking] Clear kill flag of all operands at all their uses." X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd72c216cd1444252b45b9c7af305e7c7157a5fa;p=oota-llvm.git Revert r216803 "[MachineSinking] Clear kill flag of all operands at all their uses." This reverts commit r216803, because it might have broken the buildbot. The issue is tracked in PR20842. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217120 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineSink.cpp b/lib/CodeGen/MachineSink.cpp index edf8fc0645b..77820010cef 100644 --- a/lib/CodeGen/MachineSink.cpp +++ b/lib/CodeGen/MachineSink.cpp @@ -724,19 +724,9 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) { ++MachineBasicBlock::iterator(DbgMI)); } - // When sinking the instruction the live time of its operands can be extended - // bejond their original last use (marked with a kill flag). Conservatively - // clear the kill flag in all instructions that use the same operand - // registers. - for (auto &MO : MI->uses()) - if (MO.isReg() && MO.isUse()) { - // Preserve the kill flag for this instruction. - bool IsKill = MO.isKill(); - // Clear the kill flag in all instruction that use this operand. - MRI->clearKillFlags(MO.getReg()); - // Restore the kill flag for only this instruction. - MO.setIsKill(IsKill); - } + // Conservatively, clear any kill flags, since it's possible that they are no + // longer correct. + MI->clearKillInfo(); return true; } diff --git a/test/CodeGen/AArch64/fast-isel-machine-sink.ll b/test/CodeGen/AArch64/fast-isel-machine-sink.ll deleted file mode 100644 index 74d3e8dbad0..00000000000 --- a/test/CodeGen/AArch64/fast-isel-machine-sink.ll +++ /dev/null @@ -1,27 +0,0 @@ -; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -verify-machineinstrs < %s - -define void @test() { - %sext = shl i64 undef, 32 - %1 = ashr exact i64 %sext, 32 - %2 = icmp sgt i64 undef, %1 - br i1 %2, label %3, label %.critedge1 - -;