[PATCH] D19042: AMDGPU: change a redundant if () to an assert(). NFC

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 10:48:01 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL266344: AMDGPU: change a redundant if () to an assert(). NFC (authored by nha).

Changed prior to commit:
  http://reviews.llvm.org/D19042?vs=53493&id=53757#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19042

Files:
  llvm/trunk/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp

Index: llvm/trunk/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
@@ -341,8 +341,7 @@
 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19042.53757.patch
Type: text/x-patch
Size: 568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160414/817c5747/attachment.bin>


More information about the llvm-commits mailing list