[llvm-commits] [llvm] r42765 - in /llvm/trunk/test/CodeGen/X86: mul128.ll mul64.ll

Chris Lattner clattner at apple.com
Mon Oct 8 23:06:52 PDT 2007


On Oct 8, 2007, at 1:48 PM, Dan Gohman wrote:

> Author: djg
> Date: Mon Oct  8 15:48:12 2007
> New Revision: 42765
>
> URL: http://llvm.org/viewvc/llvm-project?rev=42765&view=rev
> Log:
> These two tests now require only three multiply instructions,
> instead of four.

Very nice Dan!  I think this completes the "Add a MUL2U and MUL2S  
nodes to represent a multiply that returns both the.." note in X86/ 
README.txt.

Among other nice things, we now compile:

long long test(int X, int Y) { return (long long)X*Y; }

into:

_test:
         movl    4(%esp), %ecx
         movl    8(%esp), %eax
         imull   %ecx
         ret

instead of:

_test:
         pushl   %esi
         movl    8(%esp), %ecx
         movl    12(%esp), %esi
         movl    %esi, %eax
         imull   %ecx
         imull   %ecx, %esi
         movl    %esi, %eax
         popl    %esi
         ret

Can you please update the readme and add regtests for the cases it  
mentions?

Thanks for tackling this!

-Chris



More information about the llvm-commits mailing list