[Mesa-dev] [PATCH] i965: Fix constant propagation into 32-bit integer MUL.

Eric Anholt eric at anholt.net
Wed Nov 2 09:56:53 PDT 2011


On Tue,  1 Nov 2011 20:58:16 -0700, Paul Berry <stereotype441 at gmail.com> wrote:
> i965's MUL instruction can't take an immediate value as its first
> argument.  So normally, if constant propagation wants to propagate a
> constant into the first argument of a MUL instruction, it swaps the
> order of the two arguments.
> 
> This doesn't work for 32-bit integer (and unsigned integer)
> multiplies, because the MUL operation is asymmetric in that case (it
> multiplies 16 bits of one operand by 32 bits of the other).
> 
> Fixes piglit tests {vs,fs}-multiply-const-{ivec4,uvec4}.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111102/b4a29980/attachment.pgp>


More information about the mesa-dev mailing list