[MachineInstrBundle] Actually set the PartialDeadDef flag only when the register
authorQuentin Colombet <qcolombet@apple.com>
Wed, 27 Apr 2016 00:16:29 +0000 (00:16 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Wed, 27 Apr 2016 00:16:29 +0000 (00:16 +0000)
is defined!

The users were checking the proper thing (Defined + PartialDeadDef), but the
information may have been wrong for other use cases, so fix that.

llvm-svn: 267641

llvm/lib/CodeGen/MachineInstrBundle.cpp

index 725237b..985a086 100644 (file)
@@ -335,7 +335,7 @@ MachineOperandIteratorBase::analyzePhysReg(unsigned Reg,
   if (AllDefsDead) {
     if (PRI.FullyDefined || PRI.Clobbered)
       PRI.DeadDef = true;
-    else
+    else if (PRI.Defined)
       PRI.PartialDeadDef = true;
   }