summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-07-11 16:46:19 -0500
committerJason Ekstrand <[email protected]>2019-07-16 16:05:16 +0000
commit197a08dc69f3880c3274194fcdd934529087aaea (patch)
treebde95eb2e30db19e2f649ec5e9473dd6603af60a /src/compiler
parentd65902c179399497e2d52000d587b7fab1719fef (diff)
nir/lower_doubles: Use "alu" for the nir_alu_instr
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_lower_double_ops.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/compiler/nir/nir_lower_double_ops.c b/src/compiler/nir/nir_lower_double_ops.c
index 4ddd91f9054..2130acdac69 100644
--- a/src/compiler/nir/nir_lower_double_ops.c
+++ b/src/compiler/nir/nir_lower_double_ops.c
@@ -610,35 +610,35 @@ nir_lower_doubles_op_to_options_mask(nir_op opcode)
}
static bool
-lower_doubles_instr(nir_builder *b, nir_alu_instr *instr,
+lower_doubles_instr(nir_builder *b, nir_alu_instr *alu,
const nir_shader *softfp64,
nir_lower_doubles_options options)
{
- assert(instr->dest.dest.is_ssa);
- bool is_64 = instr->dest.dest.ssa.bit_size == 64;
+ assert(alu->dest.dest.is_ssa);
+ bool is_64 = alu->dest.dest.ssa.bit_size == 64;
- unsigned num_srcs = nir_op_infos[instr->op].num_inputs;
+ unsigned num_srcs = nir_op_infos[alu->op].num_inputs;
for (unsigned i = 0; i < num_srcs; i++) {
- is_64 |= (nir_src_bit_size(instr->src[i].src) == 64);
+ is_64 |= (nir_src_bit_size(alu->src[i].src) == 64);
}
if (!is_64)
return false;
- if (lower_doubles_instr_to_soft(b, instr, softfp64, options))
+ if (lower_doubles_instr_to_soft(b, alu, softfp64, options))
return true;
- if (!(options & nir_lower_doubles_op_to_options_mask(instr->op)))
+ if (!(options & nir_lower_doubles_op_to_options_mask(alu->op)))
return false;
- b->cursor = nir_before_instr(&instr->instr);
+ b->cursor = nir_before_instr(&alu->instr);
- nir_ssa_def *src = nir_mov_alu(b, instr->src[0],
- instr->dest.dest.ssa.num_components);
+ nir_ssa_def *src = nir_mov_alu(b, alu->src[0],
+ alu->dest.dest.ssa.num_components);
nir_ssa_def *result;
- switch (instr->op) {
+ switch (alu->op) {
case nir_op_frcp:
result = lower_rcp(b, src);
break;
@@ -665,8 +665,8 @@ lower_doubles_instr(nir_builder *b, nir_alu_instr *instr,
break;
case nir_op_fmod: {
- nir_ssa_def *src1 = nir_mov_alu(b, instr->src[1],
- instr->dest.dest.ssa.num_components);
+ nir_ssa_def *src1 = nir_mov_alu(b, alu->src[1],
+ alu->dest.dest.ssa.num_components);
result = lower_mod(b, src, src1);
}
break;
@@ -674,8 +674,8 @@ lower_doubles_instr(nir_builder *b, nir_alu_instr *instr,
unreachable("unhandled opcode");
}
- nir_ssa_def_rewrite_uses(&instr->dest.dest.ssa, nir_src_for_ssa(result));
- nir_instr_remove(&instr->instr);
+ nir_ssa_def_rewrite_uses(&alu->dest.dest.ssa, nir_src_for_ssa(result));
+ nir_instr_remove(&alu->instr);
return true;
}