Revert "Simplify code. NFC."
authorChad Rosier <mcrosier@codeaurora.org>
Fri, 9 Oct 2015 19:48:48 +0000 (19:48 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Fri, 9 Oct 2015 19:48:48 +0000 (19:48 +0000)
This reverts commit r248610.

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

lib/CodeGen/AggressiveAntiDepBreaker.cpp

index a3a52aa907fa1d3da39efe1eb38c26c53eddf9fa..845408f15f5c052faa8824937ba80c60dde8b3c0 100644 (file)
@@ -224,7 +224,12 @@ bool AggressiveAntiDepBreaker::IsImplicitDefUse(MachineInstr *MI,
   if (Reg == 0)
     return false;
 
-  MachineOperand *Op = MI->findRegisterUseOperand(Reg, /*isKill=*/MO.isDef());
+  MachineOperand *Op = nullptr;
+  if (MO.isDef())
+    Op = MI->findRegisterUseOperand(Reg, true);
+  else
+    Op = MI->findRegisterDefOperand(Reg);
+
   return(Op && Op->isImplicit());
 }