1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

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
This commit is contained in:
Nicolai Haehnle 2016-04-14 17:42:18 +00:00
parent c2eabf0b58
commit 141bf141e2

View File

@ -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