On Mon, Jul 21, 2014 at 3:39 PM, Matt Turner <matts...@gmail.com> wrote:
> On Mon, Jul 21, 2014 at 2:04 PM, Ian Romanick <i...@freedesktop.org> wrote:
>> From: Ian Romanick <ian.d.roman...@intel.com>
>>
>> Just a few lines earlier we may have wrapped the index expression with
>> ir_unop_i2u expression.  Whenever that happens, as_constant will return
>> NULL, and that almost always happens.
>
> Are you saying that since we just passed array_index to i2u we know it
> must be a constant? I can follow that much, but I don't see anything
> that really makes sure this is a constant.

I think this is more of optimization, in that if deref->array_index
were a constant but it got wrapped in an i2u expressoin then we
would've gone and generated an add and a mul instruction when that
isn't really necessary.

In any case, this patch is

Reviewed-by: Connor Abbott <cwabbo...@gmail.com>

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

Reply via email to