gallium/radeon: cleanup and fix branch emits
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 28 Sep 2016 16:20:32 +0000 (18:20 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 4 Oct 2016 14:39:10 +0000 (16:39 +0200)
commit6f87d7a14699277be6dd17e9e712841c4057c4df
tree49bda75e86e28ae7f8981b864412f48ba05bc2fe
parentdfc1afda83a22d8e6b23f003748cd78fd089a0ac
gallium/radeon: cleanup and fix branch emits

Some of the existing code is needlessly complicated. The basic principle
should be: control-flow opcodes emit branches to properly terminate the
current block, _unless_ the current block already has a terminator (which
happens if and only if there was a BRK or CONT).

This also fixes a bug where multiple terminators were created in a block.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97887
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c