AMDGPU: Also look for s_cbranch_vccz

llvm-svn: 270091
This commit is contained in:
Matt Arsenault 2016-05-19 18:20:25 +00:00
parent fb8978fc6a
commit 4318ea354a
1 changed files with 2 additions and 1 deletions

View File

@ -158,7 +158,8 @@ bool SILowerControlFlow::shouldSkip(MachineBasicBlock *From,
// 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)