diff options
author | Juan A. Suarez Romero <[email protected]> | 2019-02-27 10:42:00 +0000 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-02-28 09:47:06 +0100 |
commit | b43b55d4619489e603780adf3c92a36dadcc362b (patch) | |
tree | 33cc3a33e3bc89d26b9b971ce1caf274e39b6b44 /src/compiler/spirv/.gitignore | |
parent | 0c3287e94d7e5483b31ec9a56447ac5af55d35c1 (diff) |
nir/spirv: return after emitting a branch in blockcros-mesa-19.0-r1-vanillachadv/cros-mesa-19.0-r1-vanilla
When emitting a branch in a block, it does not make sense to continue
processing further instructions, as they will not be reachable.
This fixes a nasty case with a loop with a branch that both then-part
and else-part exits the loop:
%1 = OpLabel
OpLoopMerge %2 %3 None
OpBranchConditional %false %2 %2
%3 = OpLabel
OpBranch %1
%2 = OpLabel
[...]
We know that block %1 will branch always to block %2, which is the merge
block for the loop. And thus a break is emitted. If we keep continuing
processing further instructions, we will be processing the branch
conditional and thus emitting the proper NIR conditional, which leads to
instructions after the break.
This fixes dEQP-VK.graphicsfuzz.continue-and-merge.
CC: Jason Ekstrand <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/spirv/.gitignore')
0 files changed, 0 insertions, 0 deletions