[PATCH] D20400: AMDGPU: Also look for s_cbranch_vccz

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 16:15:55 PDT 2016


arsenm created this revision.
arsenm added reviewers: tstellarAMD, nhaehnle.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: kzhuravl, arsenm.

http://reviews.llvm.org/D20400

Files:
  lib/Target/AMDGPU/SILowerControlFlow.cpp

Index: lib/Target/AMDGPU/SILowerControlFlow.cpp
===================================================================
--- lib/Target/AMDGPU/SILowerControlFlow.cpp
+++ lib/Target/AMDGPU/SILowerControlFlow.cpp
@@ -158,7 +158,8 @@
       // When a uniform loop is inside non-uniform control flow, the branch
       // leaving the loop might be an S_CBRANCH_VCCNZ, which is never taken
       // when EXEC = 0. We should skip the loop lest it becomes infinite.
-      if (I->getOpcode() == AMDGPU::S_CBRANCH_VCCNZ)
+      if (I->getOpcode() == AMDGPU::S_CBRANCH_VCCNZ ||
+          I->getOpcode() == AMDGPU::S_CBRANCH_VCCZ)
         return true;
 
       if (++NumInstr >= SkipThreshold)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20400.57707.patch
Type: text/x-patch
Size: 682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160518/e49659ae/attachment.bin>


More information about the llvm-commits mailing list