summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-05-16 23:39:27 +0000
committerCraig Topper <craig.topper@intel.com>2018-05-16 23:39:27 +0000
commit342273a13988b0ebe2428c041c14b86dedbfce4a (patch)
tree373d89cde4ec379096950fa5028229e7082a9c11
parenta52d30b2bc2574c3f8301c7bf9397ce6f2035a98 (diff)
downloadbcm5719-llvm-342273a13988b0ebe2428c041c14b86dedbfce4a.tar.gz
bcm5719-llvm-342273a13988b0ebe2428c041c14b86dedbfce4a.zip
[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
-rw-r--r--llvm/lib/CodeGen/ImplicitNullChecks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
index 98c3039863e..ab777d28cd4 100644
--- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp
+++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
@@ -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!");
}
OpenPOWER on IntegriCloud