]> granicus.if.org Git - llvm/commitdiff
ScheduleDAGInstrs: Do not try to toggle kill flags on debug uses
authorMatthias Braun <matze@braunis.de>
Fri, 27 Jan 2017 18:53:07 +0000 (18:53 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 27 Jan 2017 18:53:07 +0000 (18:53 +0000)
Preparation for upcoming changes. No testcase as none of the public
targets bundles early enough and has a post machine scheduler enabled at
the same time. The error is also easily catched by asserts.

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

lib/CodeGen/ScheduleDAGInstrs.cpp

index 520a6ff7563ac166d480c797a3d326e5de4ed3bd..b5c04497fbbe920e1355f544393818ef6c6bcad9 100644 (file)
@@ -1159,6 +1159,9 @@ static void toggleBundleKillFlag(MachineInstr *MI, unsigned Reg,
 }
 
 void ScheduleDAGInstrs::toggleKillFlag(MachineInstr &MI, MachineOperand &MO) {
+  if (MO.isDebug())
+    return;
+
   // Setting kill flag...
   if (!MO.isKill()) {
     MO.setIsKill(true);