[Mesa-dev] [PATCH 1/3] nir/opt_dead_cf: correction of side effect check

Jason Ekstrand jason at jlekstrand.net
Sat Apr 30 19:18:14 UTC 2016


On Fri, Apr 29, 2016 at 9:59 PM, Thomas H.P. Andersen <phomes at gmail.com>
wrote:

>
>
> On Fri, Apr 29, 2016 at 8:39 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
>
>>
>>
>> On Fri, Apr 29, 2016 at 11:31 AM, Thomas Hindoe Paaboel Andersen <
>> phomes at gmail.com> wrote:
>>
>>> Parenthesis are needed here as ! takes precedence over the &. The
>>> check had the opposite effect than intended.
>>> ---
>>> Not tested as I do not own the neccesary hardware.
>>>
>>>  src/compiler/nir/nir_opt_dead_cf.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/compiler/nir/nir_opt_dead_cf.c
>>> b/src/compiler/nir/nir_opt_dead_cf.c
>>> index 2e04c17..7450b1c 100644
>>> --- a/src/compiler/nir/nir_opt_dead_cf.c
>>> +++ b/src/compiler/nir/nir_opt_dead_cf.c
>>> @@ -155,8 +155,8 @@ cf_node_has_side_effects(nir_cf_node *node)
>>>              continue;
>>>
>>>           nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
>>> -         if (!nir_intrinsic_infos[intrin->intrinsic].flags &
>>> -             NIR_INTRINSIC_CAN_ELIMINATE)
>>> +         if (!(nir_intrinsic_infos[intrin->intrinsic].flags &
>>> +             NIR_INTRINSIC_CAN_ELIMINATE))
>>>
>>
>> Good catch!  All three patches are
>>
>> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
>>
>
> Thanks Jason! Can I ask you to push it? I do not have commit access.
>

Pushed!


>              return true;
>>>        }
>>>     }
>>> --
>>> 2.7.4
>>>
>>> _______________________________________________
>>> 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/20160430/9fe2653c/attachment.html>


More information about the mesa-dev mailing list