After PostRA scheduling, don't set kill flags on undef operands.
authorAndrew Trick <atrick@apple.com>
Wed, 16 Oct 2013 18:30:23 +0000 (18:30 +0000)
committerAndrew Trick <atrick@apple.com>
Wed, 16 Oct 2013 18:30:23 +0000 (18:30 +0000)
This should fix the ATOM buildbot failing on break-avx-dep.ll.

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

lib/CodeGen/PostRASchedulerList.cpp

index b8747b9330be35486c850597724fc2bdd44bfcf7..1afc1eca00a9e9f809520e8ccfe8ef7d32ed1b47 100644 (file)
@@ -515,11 +515,11 @@ void SchedulePostRATDList::FixupKills(MachineBasicBlock *MBB) {
 
     // Examine all used registers and set/clear kill flag. When a
     // register is used multiple times we only set the kill flag on
-    // the first use.
+    // the first use. Don't set kill flags on undef operands.
     killedRegs.reset();
     for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
       MachineOperand &MO = MI->getOperand(i);
-      if (!MO.isReg() || !MO.isUse()) continue;
+      if (!MO.isReg() || !MO.isUse() || MO.isUndef()) continue;
       unsigned Reg = MO.getReg();
       if ((Reg == 0) || MRI.isReserved(Reg)) continue;