mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 01:10:16 +01:00
brw: Fix folding case for MAD instruction with all immediates
Fixes: b605f76b2a ("brw/algebraic: Constant fold multiplicands of MAD")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36867>
This commit is contained in:
parent
eec64c865f
commit
74a4e7dd4b
2 changed files with 5 additions and 5 deletions
|
|
@ -181,12 +181,12 @@ brw_opt_constant_fold_instruction(const intel_device_info *devinfo, brw_inst *in
|
|||
break;
|
||||
|
||||
case BRW_OPCODE_MAD:
|
||||
if (inst->src[1].file == IMM &&
|
||||
if (inst->src[0].file == IMM &&
|
||||
inst->src[1].file == IMM &&
|
||||
inst->src[2].file == IMM &&
|
||||
inst->src[3].file == IMM &&
|
||||
!brw_type_is_vector_imm(inst->src[0].type) &&
|
||||
!brw_type_is_vector_imm(inst->src[1].type) &&
|
||||
!brw_type_is_vector_imm(inst->src[2].type) &&
|
||||
!brw_type_is_vector_imm(inst->src[3].type)) {
|
||||
!brw_type_is_vector_imm(inst->src[2].type)) {
|
||||
fold_multiplicands_of_MAD(inst);
|
||||
assert(inst->opcode == BRW_OPCODE_ADD);
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ TEST_F(algebraic_test, fmax_a_a)
|
|||
EXPECT_NO_PROGRESS(brw_opt_algebraic, bld);
|
||||
}
|
||||
|
||||
TEST_F(algebraic_test, mad_with_all_immediates_DISABLED)
|
||||
TEST_F(algebraic_test, mad_with_all_immediates)
|
||||
{
|
||||
brw_builder bld = make_shader();
|
||||
brw_builder exp = make_shader();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue