[Mesa-dev] [PATCH 1/6] i965/fs: Lower integer multiplication after optimizations.

Matt Turner mattst88 at gmail.com
Sat May 16 11:25:05 PDT 2015


On Sat, May 16, 2015 at 8:37 AM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On Fri, May 15, 2015 at 2:02 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> 32-bit x 32-bit integer multiplication requires multiple instructions
>> until Broadwell. This patch just lets us treat the MUL instruction in
>> the FS backend like it operates on Broadwell, and after optimizations
>> we lower it into a sequence of instructions on older platforms.
>
> Any reason why you chose to re-use the MUL instruction with D types
> rather than making a logical IMUL instruction?  I think I have a minor
> preference for IMUL but I also understand that it can be a pain to
> plumb through.

Yes, basically I'm just changing the integer multiply IR from
pre-Broadwell to Broadwell semantics, and the lowering pass sorts out
the pre-Broadwell differences. Since you still have to have MUL, this
seems cleaner than adding an additional virtual operation (which
wouldn't be necessary on Broadwell).


More information about the mesa-dev mailing list