[Mesa-dev] [PATCH] intel/vec4: Add some fall through comments
Jason Ekstrand
jason at jlekstrand.net
Mon Apr 3 23:58:16 UTC 2017
On Mon, Apr 3, 2017 at 4:43 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Mon, Apr 3, 2017 at 7:24 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > ---
> > src/intel/compiler/brw_vec4_nir.cpp | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/src/intel/compiler/brw_vec4_nir.cpp
> b/src/intel/compiler/brw_vec4_nir.cpp
> > index 2384265..613c695 100644
> > --- a/src/intel/compiler/brw_vec4_nir.cpp
> > +++ b/src/intel/compiler/brw_vec4_nir.cpp
> > @@ -1310,6 +1310,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
> >
> > case nir_op_iadd:
> > assert(nir_dest_bit_size(instr->dest.dest) < 64);
> > + /* fall through */
> > case nir_op_fadd:
> > inst = emit(ADD(dst, op[0], op[1]));
> > inst->saturate = instr->dest.saturate;
> > @@ -1539,6 +1540,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
> >
> > case nir_op_imin:
> > case nir_op_umin:
> > + /* fall through */
>
> Normally these are placed at the end rather than the beginning. Not
> sure if this will shut coverity up or not.
>
I think it would but I fixed it locally anyway. Thanks!
--Jason
> > assert(nir_dest_bit_size(instr->dest.dest) < 64);
> > case nir_op_fmin:
> > inst = emit_minmax(BRW_CONDITIONAL_L, dst, op[0], op[1]);
> > @@ -1548,6 +1550,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
> > case nir_op_imax:
> > case nir_op_umax:
> > assert(nir_dest_bit_size(instr->dest.dest) < 64);
> > + /* fall through */
> > case nir_op_fmax:
> > inst = emit_minmax(BRW_CONDITIONAL_GE, dst, op[0], op[1]);
> > inst->saturate = instr->dest.saturate;
> > @@ -2054,6 +2057,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
> > case nir_op_iabs:
> > case nir_op_ineg:
> > assert(nir_dest_bit_size(instr->dest.dest) < 64);
> > + /* fall through */
> > case nir_op_fabs:
> > case nir_op_fneg:
> > case nir_op_fsat:
> > --
> > 2.5.0.400.gff86faf
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170403/0e9e0089/attachment-0001.html>
More information about the mesa-dev
mailing list