diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2016-04-14 17:42:18 +0000 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2016-04-14 17:42:18 +0000 |
commit | 19f0f5177da807ca4e65f6f81e110929201cd3de (patch) | |
tree | dd50c0d41ea397abd04e001bdb19047b6f858aa6 | |
parent | 4f42310dfb0cb4ef2a9c8c6920e7e730aa212012 (diff) | |
download | bcm5719-llvm-19f0f5177da807ca4e65f6f81e110929201cd3de.tar.gz bcm5719-llvm-19f0f5177da807ca4e65f6f81e110929201cd3de.zip |
AMDGPU: change a redundant if () to an assert(). NFC
Summary:
I've been carrying this change around with me for a while, because the if ()
managed to confuse me while following the code. All callers ensure that the
assertion holds.
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D19042
llvm-svn: 266344
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp b/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp index 563beba5b5c..3009564f854 100644 --- a/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp +++ b/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp @@ -341,8 +341,7 @@ void SIAnnotateControlFlow::handleLoop(BranchInst *Term) { void SIAnnotateControlFlow::closeControlFlow(BasicBlock *BB) { llvm::Loop *L = LI->getLoopFor(BB); - if (Stack.back().first != BB) - return; + assert(Stack.back().first == BB); if (L && L->getHeader() == BB) { // We can't insert an EndCF call into a loop header, because it will |