AMDGPU/SI: Fix a mis-compilation of multi-level breaks
authorNicolai Haehnle <nhaehnle@gmail.com>
Tue, 12 Apr 2016 16:10:38 +0000 (16:10 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Tue, 12 Apr 2016 16:10:38 +0000 (16:10 +0000)
commit279970c0dc769dc24e5b66ed8fa6fcdc7653d4f4
tree75fe7a80883d4d7bcbf3508519b27a53fe667829
parent2f70584ae62056811007da1c1c89678c2c72c673
AMDGPU/SI: Fix a mis-compilation of multi-level breaks

Summary:
Under certain circumstances, multi-level breaks (or what is understood by
the control flow passes as such) could be miscompiled in a way that causes
infinite loops, by emitting incorrect control flow intrinsics.

This fixes a hang in
dEQP-GLES3.functional.shaders.loops.while_dynamic_iterations.conditional_continue_vertex

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D18967

llvm-svn: 266088
llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
llvm/test/CodeGen/AMDGPU/multilevel-break.ll [new file with mode: 0644]