mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
jay/opt_dead_code: handle predication
otherwise we'll get validation splat soon. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41064>
This commit is contained in:
parent
f63ab3eea5
commit
176b9a0f0c
1 changed files with 7 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include "util/bitset.h"
|
||||
#include "jay_builder.h"
|
||||
#include "jay_ir.h"
|
||||
#include "jay_opcodes.h"
|
||||
#include "jay_private.h"
|
||||
|
|
@ -18,6 +19,12 @@ pass(jay_function *f)
|
|||
if (!BITSET_TEST_COUNT(live_set, jay_base_index(I->dst),
|
||||
jay_num_values(I->dst)) &&
|
||||
I->op != JAY_OPCODE_SEND) {
|
||||
|
||||
if (I->predication == JAY_PREDICATED_DEFAULT && !jay_is_null(I->dst)) {
|
||||
jay_shrink_sources(I, I->num_srcs - 1);
|
||||
I->predication = JAY_PREDICATED;
|
||||
}
|
||||
|
||||
I->dst = jay_null();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue