Re: [Mesa-dev] [PATCH] nir: remove the abs call in is_neg_power_of_two

2018-02-09 Thread Gustaw Smolarczyk
2018-02-09 0:16 GMT+01:00 Matt Turner : > On Mon, Feb 5, 2018 at 7:16 PM, Vlad Golovkin > wrote: > > val->i32[swizzle[i]] is guaranteed to have non-positive value before the > > __is_power_of_two call, so unary minus is equivalent to abs in this

Re: [Mesa-dev] [PATCH] nir: remove the abs call in is_neg_power_of_two

2018-02-08 Thread Matt Turner
On Mon, Feb 5, 2018 at 7:16 PM, Vlad Golovkin wrote: > val->i32[swizzle[i]] is guaranteed to have non-positive value before the > __is_power_of_two call, so unary minus is equivalent to abs in this case. > --- > src/compiler/nir/nir_search_helpers.h | 2 +- > 1 file

[Mesa-dev] [PATCH] nir: remove the abs call in is_neg_power_of_two

2018-02-05 Thread Vlad Golovkin
val->i32[swizzle[i]] is guaranteed to have non-positive value before the __is_power_of_two call, so unary minus is equivalent to abs in this case. --- src/compiler/nir/nir_search_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_search_helpers.h