summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/intel/compiler/brw_nir_opt_peephole_ffma.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/intel/compiler/brw_nir_opt_peephole_ffma.c b/src/intel/compiler/brw_nir_opt_peephole_ffma.c
index cc225e1847b..7271bdbca43 100644
--- a/src/intel/compiler/brw_nir_opt_peephole_ffma.c
+++ b/src/intel/compiler/brw_nir_opt_peephole_ffma.c
@@ -68,7 +68,7 @@ are_all_uses_fadd(nir_ssa_def *def)
}
static nir_alu_instr *
-get_mul_for_src(nir_alu_src *src, int num_components,
+get_mul_for_src(nir_alu_src *src, unsigned num_components,
uint8_t swizzle[4], bool *negate, bool *abs)
{
uint8_t swizzle_tmp[4];
@@ -93,16 +93,19 @@ get_mul_for_src(nir_alu_src *src, int num_components,
switch (alu->op) {
case nir_op_imov:
case nir_op_fmov:
- alu = get_mul_for_src(&alu->src[0], num_components, swizzle, negate, abs);
+ alu = get_mul_for_src(&alu->src[0], alu->dest.dest.ssa.num_components,
+ swizzle, negate, abs);
break;
case nir_op_fneg:
- alu = get_mul_for_src(&alu->src[0], num_components, swizzle, negate, abs);
+ alu = get_mul_for_src(&alu->src[0], alu->dest.dest.ssa.num_components,
+ swizzle, negate, abs);
*negate = !*negate;
break;
case nir_op_fabs:
- alu = get_mul_for_src(&alu->src[0], num_components, swizzle, negate, abs);
+ alu = get_mul_for_src(&alu->src[0], alu->dest.dest.ssa.num_components,
+ swizzle, negate, abs);
*negate = false;
*abs = true;
break;