On 11/30/2012 03:10 AM, Dave Airlie wrote:
coverity pointed out the below as suspect, since num_iterations = 0,
and we do a loop from 0..0

Dave.

  if (FALSE&&  ((util_cpu_caps.has_sse&&  type.width == 32&&
type.length == 4) ||
          (util_cpu_caps.has_avx&&  type.width == 32&&  type.length == 8))){
       const unsigned num_iterations = 0;
       LLVMValueRef res;
       unsigned i;
       const char *intrinsic = NULL;

       if (type.length == 4) {
          intrinsic = "llvm.x86.sse.rcp.ps";
       }
       else {
          intrinsic = "llvm.x86.avx.rcp.ps.256";
       }

       res = lp_build_intrinsic_unary(builder, intrinsic, bld->vec_type, a);

       for (i = 0; i<  num_iterations; ++i) {
          res = lp_build_rcp_refine(bld, a, res);
       }
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

I guess we could set num_iterations = 1 for now but it doesn't really matter since this block of code is disabled (note the "if (FALSE)" part).

Jose, I think you wrote that code.

-Brian

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to