Yeah.... This is where things get interesting. Do you know where the MOVs are coming from? Any scalar 64-bit SSA MOVs with scalar sources I would expect to get deleted by copy propagation. We could still get some from phis but the right thing to do there is likely to have a 64-bit phi lowering pass that chews them up and dumps out pairs of 32-bit phis or maybe vec2s instead of uint64_ts. Apart from those, we still have 64-bit UBO and input pulls which look 64-bit in NIR but are actually 32-bit in the back-end. We could probably lower those in NIR if we wanted.
Sorry for rambling; I'm just trying to iterate all the remaining sources of 64-bit values once all the ALU ops are gone. It may or may not be worth it to try and get rid of them all vs. just letting the back end deal with it. No real solutions yet, just disjointed thoughts, I'm afraid. --Jason On Sun, Oct 14, 2018 at 5:12 PM Matt Turner <matts...@gmail.com> wrote: > FINISHME: Lower them in NIR instead? > --- > src/intel/compiler/brw_fs.cpp | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > > diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp > index 69726ed70e8..9e50df59356 100644 > --- a/src/intel/compiler/brw_fs.cpp > +++ b/src/intel/compiler/brw_fs.cpp > @@ -2403,9 +2403,28 @@ fs_visitor::opt_algebraic() > { > bool progress = false; > > - foreach_block_and_inst(block, fs_inst, inst, cfg) { > + foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { > switch (inst->opcode) { > case BRW_OPCODE_MOV: > + if (!devinfo->has_64bit_types && > + (inst->dst.type == BRW_REGISTER_TYPE_DF || > + inst->dst.type == BRW_REGISTER_TYPE_UQ || > + inst->dst.type == BRW_REGISTER_TYPE_Q)) { > + assert(inst->dst.type == inst->src[0].type); > + assert(!inst->saturate); > + assert(!inst->src[0].abs); > + assert(!inst->src[0].negate); > + const brw::fs_builder ibld(this, block, inst); > + > + ibld.MOV(subscript(inst->dst, BRW_REGISTER_TYPE_UD, 1), > + subscript(inst->src[0], BRW_REGISTER_TYPE_UD, 1)); > + ibld.MOV(subscript(inst->dst, BRW_REGISTER_TYPE_UD, 0), > + subscript(inst->src[0], BRW_REGISTER_TYPE_UD, 0)); > + > + inst->remove(block); > + progress = true; > + } > + > if (inst->src[0].file != IMM) > break; > > -- > 2.16.4 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev