summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorTimur Kristóf <[email protected]>2019-11-22 11:57:45 +0100
committerDaniel Schürmann <[email protected]>2019-12-04 10:36:01 +0000
commitc0dbf42a03842981284839d277f1ed5086381fdf (patch)
treeed327a5dbf6caa38d5b8fe8d7c5e44e51cf6baef /src/amd
parentdd9dad731bed71a77f28111b2d548b9d5163cd64 (diff)
aco/wave32: Change uniform bool optimization to work with wave32.
Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/compiler/aco_optimizer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index 7b66aa1eeb3..3622812a862 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -993,13 +993,13 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr)
case aco_opcode::s_add_u32:
ctx.info[instr->definitions[0].tempId()].set_add_sub(instr.get());
break;
+ case aco_opcode::s_and_b32:
case aco_opcode::s_and_b64:
if (instr->operands[1].isFixed() && instr->operands[1].physReg() == exec &&
instr->operands[0].isTemp() && ctx.info[instr->operands[0].tempId()].is_uniform_bool()) {
ctx.info[instr->definitions[1].tempId()].set_temp(ctx.info[instr->operands[0].tempId()].temp);
}
/* fallthrough */
- case aco_opcode::s_and_b32:
case aco_opcode::s_not_b32:
case aco_opcode::s_not_b64:
case aco_opcode::s_or_b32:
@@ -1042,6 +1042,7 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr)
ctx.info[instr->definitions[0].tempId()].set_fcmp(instr.get());
break;
case aco_opcode::s_cselect_b64:
+ case aco_opcode::s_cselect_b32:
if (instr->operands[0].constantEquals((unsigned) -1) &&
instr->operands[1].constantEquals(0)) {
/* Found a cselect that operates on a uniform bool that comes from eg. s_cmp */