treewide: Drop some is_ssa if's
Via Coccinelle patch: @@ expression x; @@ -if (!x.is_ssa) { -... -} and likewise with x->is_ssa, with invalid hunks manually filtered out. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24432>
This commit is contained in:

committed by
Marge Bot

parent
ba5aaf2ff7
commit
579bc1e72e
@@ -366,9 +366,6 @@ alu_src_has_identity_swizzle(nir_alu_instr *alu, unsigned src_idx)
|
||||
static bool
|
||||
is_only_uniform_src(nir_src *src)
|
||||
{
|
||||
if (!src->is_ssa)
|
||||
return false;
|
||||
|
||||
nir_instr *instr = src->ssa->parent_instr;
|
||||
|
||||
switch (instr->type) {
|
||||
@@ -760,9 +757,6 @@ try_eval_const_alu(nir_const_value *dest, nir_alu_instr *alu,
|
||||
{
|
||||
nir_const_value src[NIR_MAX_VEC_COMPONENTS][NIR_MAX_VEC_COMPONENTS];
|
||||
|
||||
if (!alu->dest.dest.is_ssa)
|
||||
return false;
|
||||
|
||||
/* In the case that any outputs/inputs have unsized types, then we need to
|
||||
* guess the bit-size. In this case, the validator ensures that all
|
||||
* bit-sizes match so we can just take the bit-size from first
|
||||
@@ -777,9 +771,6 @@ try_eval_const_alu(nir_const_value *dest, nir_alu_instr *alu,
|
||||
bit_size = alu->dest.dest.ssa.bit_size;
|
||||
|
||||
for (unsigned i = 0; i < nir_op_infos[alu->op].num_inputs; i++) {
|
||||
if (!alu->src[i].src.is_ssa)
|
||||
return false;
|
||||
|
||||
if (bit_size == 0 &&
|
||||
!nir_alu_type_get_type_size(nir_op_infos[alu->op].input_types[i]))
|
||||
bit_size = alu->src[i].src.ssa->bit_size;
|
||||
|
Reference in New Issue
Block a user