[Mesa-dev] [PATCH v2 07/52] intel/fs: Use a pair of 1-wide MOVs instead of SEL for any/all

Jason Ekstrand jason at jlekstrand.net
Tue Oct 17 21:53:52 UTC 2017


On Tue, Oct 17, 2017 at 2:18 PM, Matt Turner <mattst88 at gmail.com> wrote:

> On 10/12, Jason Ekstrand wrote:
>
>> For some reason, the any/all predicates don't work properly with SIMD32.
>> In particular, it appears that a SEL with a QtrCtrl of 2H doesn't read
>> the correct subset of the flag register and you end up getting garbage
>> in the second half.  Work around this by using a pair of 1-wide MOVs and
>> scattering the result.  This fixes the any/all instructions for SIMD32.
>>
>
> Huh. I can see a lot of potential for hardware misbehavior here...
>
> Making things 1-wide makes a lot of sense, regardless of the bug you're
> seeing. I'm in favor of that change.
>
> I picked a SEL instead of a predicated MOV instruction since the latter
> is considered by our optimizer to be a partial write, and as such isn't
> subject to CSE, etc. The difference is probably trivial, but I'd rather
> just commit a patch to change things to be 1-wide, not s/SEL/MOV/, and
> drop the added comments from the code.
>

I'm pretty sure a 1-wide SEL is also going to be considered a partial write.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171017/63ce79b6/attachment-0001.html>


More information about the mesa-dev mailing list