[CodeGen] Use MachineInstr::getOperand(0) instead of gets the defs iterator_range and calling begin. NFC

Defs are well defined to come first in MachineInstr operand list. No need for a more complex indirection.

llvm-svn: 332559
This commit is contained in:
Craig Topper 2018-05-16 23:39:27 +00:00
parent a52d30b2bc
commit 342273a139
1 changed files with 1 additions and 1 deletions

View File

@ -596,7 +596,7 @@ MachineInstr *ImplicitNullChecks::insertFaultingInstr(
unsigned DefReg = NoRegister;
if (NumDefs != 0) {
DefReg = MI->defs().begin()->getReg();
DefReg = MI->getOperand(0).getReg();
assert(NumDefs == 1 && "expected exactly one def!");
}