Re: compilers using MMX instructions in the generated code

Milind Girkar <Milind.Girkar@intel.com>
9 Jan 2000 22:50:08 -0500

          From comp.compilers

Related articles
compilers using MMX instructions in the generated code ramkik@sasi.com (Ramkishor) (2000-01-06)
Re: compilers using MMX instructions in the generated code bcombee@metrowerks.com (2000-01-09)
Re: compilers using MMX instructions in the generated code jkahrs@castor.atlas.de (Juergen Kahrs) (2000-01-09)
Re: compilers using MMX instructions in the generated code Milind.Girkar@intel.com (Milind Girkar) (2000-01-09)
Re: compilers using MMX instructions in the generated code plakal@cs.wisc.edu (2000-01-09)
Re: compilers using MMX instructions in the generated code lindahl@pbm.com (2000-01-12)
Re: compilers using MMX instructions in the generated code olefevre@my-deja.com (2000-01-12)
Re: compilers using MMX instructions in the generated code mlross@jf.intel.com (2000-01-12)
Re: compilers using MMX instructions in the generated code andi@complang.tuwien.ac.at (2000-01-15)
Re: compilers using MMX instructions in the generated code bcombee@metrowerks.com (2000-01-19)
[4 later articles]
| List of all articles for this month |

From: Milind Girkar <Milind.Girkar@intel.com>
Newsgroups: comp.compilers
Date: 9 Jan 2000 22:50:08 -0500
Organization: Intel
References: 00-01-011
Keywords: code

Check out Intel C/C++ Compiler 4.0 and the upcoming, currently in
beta, Intel C/C++/Fortran Compilers 4.5 (automatic vectorization for
MMX technology instructions and the SIMD single precision floating
point instructions available from Pentium III onwards). The C/C++
compilers are also currently bundled with Intel's VTune, a very good
performance analysis tool to find and optimize hotspots. In addition
to automatic vectorization, the compilers also support vectorization
using directives, intrinsics and inline assembly.


As an example, for the following C loop:


float x; float a[100];
for (i=0; i<100; i++) {
    x += a[i];
}


the Intel 4.5 beta compiler will automatically generate with the -QxK
(code for Pentium III) option (only the vectorized part is shown):


                xorps xmm0, xmm0
                ALIGN 4
$B1$4:
                prefetchnta BYTE PTR _a[0+eax*4+64]
                addps xmm0, XMMWORD PTR _a[0+eax*4]
                addps xmm0, XMMWORD PTR _a[0+eax*4+16]
                add eax, 8
                cmp eax, 96
                jl $B1$4 ; Prob 99%
$B1$5:
                movaps xmm1, xmm0
                shufps xmm0, xmm0, 14
                addps xmm1, xmm0
                movaps xmm0, xmm1
                shufps xmm1, xmm1, 1
                addps xmm0, xmm1
                movss DWORD PTR [esp+28], xmm0


- Milind Girkar (working for but not speaking for Intel)




Ramkishor wrote:


> Hai,
> Are there any compilers, which can use MMX instructions(Any SIMD
> instructions like 3DNow from AMD or VIS from SUN etc.) in the code
> generated by them?


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.