mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 06:40:11 +01:00
aco: Make sure not to mistakenly propagate 64-bit constants.
ACO's optimizer would try to propagate 64-bit constants, but does so in such a way that wouldn't work due to how the 64-bit constants are handled in the IR. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
This commit is contained in:
parent
9d3e070524
commit
94e355148f
1 changed files with 3 additions and 3 deletions
|
|
@ -765,7 +765,7 @@ void label_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
|
|||
if (vec_op.isConstant()) {
|
||||
if (vec_op.isLiteral())
|
||||
ctx.info[instr->definitions[i].tempId()].set_literal(vec_op.constantValue());
|
||||
else
|
||||
else if (vec_op.size() == 1)
|
||||
ctx.info[instr->definitions[i].tempId()].set_constant(vec_op.constantValue());
|
||||
} else {
|
||||
assert(vec_op.isTemp());
|
||||
|
|
@ -794,7 +794,7 @@ void label_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
|
|||
if (vec_op.isConstant()) {
|
||||
if (vec_op.isLiteral())
|
||||
ctx.info[instr->definitions[0].tempId()].set_literal(vec_op.constantValue());
|
||||
else
|
||||
else if (vec_op.size() == 1)
|
||||
ctx.info[instr->definitions[0].tempId()].set_constant(vec_op.constantValue());
|
||||
} else {
|
||||
assert(vec_op.isTemp());
|
||||
|
|
@ -814,7 +814,7 @@ void label_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
|
|||
} else if (instr->operands[0].isConstant()) {
|
||||
if (instr->operands[0].isLiteral())
|
||||
ctx.info[instr->definitions[0].tempId()].set_literal(instr->operands[0].constantValue());
|
||||
else
|
||||
else if (instr->operands[0].size() == 1)
|
||||
ctx.info[instr->definitions[0].tempId()].set_constant(instr->operands[0].constantValue());
|
||||
} else if (instr->operands[0].isTemp()) {
|
||||
ctx.info[instr->definitions[0].tempId()].set_temp(instr->operands[0].getTemp());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue