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

Matt Turner mattst88 at gmail.com
Tue Oct 17 21:18:20 UTC 2017


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.

Assuming that still fixes the bug you see, that would be

Reviewed-by: Matt Turner <mattst88 at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171017/78ce8aa8/attachment.sig>


More information about the mesa-dev mailing list