aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2020-04-16 20:18:23 +0100
committerMarge Bot <[email protected]>2020-04-24 18:52:54 +0000
commit78389f4cbcf5b8c749dd60d9aed2b56a27b09327 (patch)
treea60e781fead82e3364a863cbea61cbc1a337f42d /src
parentdeea4b7c5aae064145f788cb408001a40526a18d (diff)
aco: handle undef p_create_vector operands in the optimizer
Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4639>
Diffstat (limited to 'src')
-rw-r--r--src/amd/compiler/aco_optimizer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index ac9e5ff399d..0543d38a3fa 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -954,6 +954,8 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr)
ctx.info[instr->definitions[i].tempId()].set_constant(vec_op.constantValue());
else if (vec_op.size() == 2)
ctx.info[instr->definitions[i].tempId()].set_constant_64bit(vec_op.constantValue());
+ } else if (vec_op.isUndefined()) {
+ ctx.info[instr->definitions[i].tempId()].set_undefined();
} else {
assert(vec_op.isTemp());
ctx.info[instr->definitions[i].tempId()].set_temp(vec_op.getTemp());
@@ -991,6 +993,8 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr)
ctx.info[instr->definitions[0].tempId()].set_constant(op.constantValue());
else if (op.size() == 2)
ctx.info[instr->definitions[0].tempId()].set_constant_64bit(op.constantValue());
+ } else if (op.isUndefined()) {
+ ctx.info[instr->definitions[0].tempId()].set_undefined();
} else {
assert(op.isTemp());
ctx.info[instr->definitions[0].tempId()].set_temp(op.getTemp());