summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-06-25 13:28:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-06-25 13:28:24 +0000
commite61cbd1f3a4e1ba32a764826e8a204bbcf6ebdbd (patch)
treedaa736e635617124656f0ef5de7dbbbb7fe8039f /llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
parent57d7232f401d664792d8fb44cf6e49d7d601c38d (diff)
downloadbcm5719-llvm-e61cbd1f3a4e1ba32a764826e8a204bbcf6ebdbd.tar.gz
bcm5719-llvm-e61cbd1f3a4e1ba32a764826e8a204bbcf6ebdbd.zip
Replace copy-pasted debug value skipping with MBB::getLastNonDebugInstr
No functional change intended. llvm-svn: 240639
Diffstat (limited to 'llvm/lib/Target/AMDGPU/R600InstrInfo.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/R600InstrInfo.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp b/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
index 5ef883cbcad..855fa9fe45b 100644
--- a/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
@@ -697,15 +697,10 @@ R600InstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
// Most of the following comes from the ARM implementation of AnalyzeBranch
// If the block has no terminators, it just falls into the block after it.
- MachineBasicBlock::iterator I = MBB.end();
- if (I == MBB.begin())
+ MachineBasicBlock::iterator I = MBB.getLastNonDebugInstr();
+ if (I == MBB.end())
return false;
- --I;
- while (I->isDebugValue()) {
- if (I == MBB.begin())
- return false;
- --I;
- }
+
// AMDGPU::BRANCH* instructions are only available after isel and are not
// handled
if (isBranch(I->getOpcode()))
OpenPOWER on IntegriCloud