- nir_ssa_def *byte =
- nir_extract_u8(b, instr->src[0].src.ssa, nir_imm_int(b, 0));
- nir_ssa_def *val =
- nir_ior(b, nir_ior(b, nir_ishl(b, nir_channel(b, byte, 3), nir_imm_int(b, 24)),
- nir_ishl(b, nir_channel(b, byte, 2), nir_imm_int(b, 16))),
- nir_ior(b, nir_ishl(b, nir_channel(b, byte, 1), nir_imm_int(b, 8)),
- nir_channel(b, byte, 0)));
-
- nir_ssa_def_rewrite_uses(&instr->dest.dest.ssa, nir_src_for_ssa(val));
- nir_instr_remove(&instr->instr);
- break;
+ nir_ssa_def *byte = nir_extract_u8(b, nir_ssa_for_alu_src(b, alu, 0),
+ nir_imm_int(b, 0));
+ return nir_ior(b, nir_ior(b, nir_ishl(b, nir_channel(b, byte, 3),
+ nir_imm_int(b, 24)),
+ nir_ishl(b, nir_channel(b, byte, 2),
+ nir_imm_int(b, 16))),
+ nir_ior(b, nir_ishl(b, nir_channel(b, byte, 1),
+ nir_imm_int(b, 8)),
+ nir_channel(b, byte, 0)));