diff options
author | Tim Northover <tnorthover@apple.com> | 2017-01-30 20:52:37 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2017-01-30 20:52:37 +0000 |
commit | c94d70336b2a66606620f03231e77211ac524c5e (patch) | |
tree | 44a605d690bd0c47ba6343cfc8441ffa2c003bdc /llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp | |
parent | ee57984c111bccc8fd809b2a9f43a4db21b6d66e (diff) | |
download | bcm5719-llvm-c94d70336b2a66606620f03231e77211ac524c5e.tar.gz bcm5719-llvm-c94d70336b2a66606620f03231e77211ac524c5e.zip |
GlobalISel: tidy up def/use test. NFC.
llvm-svn: 293545
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp index 2bb987ff681..9dba15dd8c5 100644 --- a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp @@ -142,9 +142,9 @@ bool InstructionSelect::runOnMachineFunction(MachineFunction &MF) { unsigned VReg = VRegToType.first; auto *RC = MRI.getRegClassOrNull(VReg); MachineInstr *MI = nullptr; - if (MRI.def_instr_begin(VReg) != MRI.def_instr_end()) + if (!MRI.def_empty(VReg)) MI = &*MRI.def_instr_begin(VReg); - else if (MRI.use_instr_begin(VReg) != MRI.use_instr_end()) + else if (!MRI.use_empty(VReg)) MI = &*MRI.use_instr_begin(VReg); if (MI && !RC) { |