<br><div>Hi, I have looked at the LLVM code generation quality using small test cases and in general it is better than I thought and in some cases better than gcc. However, there are still some gap in SPEC performance. I have not looked at the root cause of those gaps. Anyone who cares about LLVM performance need to take this seriously.</div>
<div><br></div><div>For fair comparison, I used -fno-strict-aliasing in gcc to turn off type based aliasing. I also used -fomit-frame-pointer for clang/llvm because this is not the default.  The base option is -O2.  Measured on 2.4GHz core-2 box.</div>
<div><br></div><div>64bit:</div><div>                                        </div><div><div>                                             llvm                 gcc       gcc vs LLVM</div><div>            164.gzip                1268                1320      4.15%</div>
<div>             175.vpr                1605                1534     -4.42%</div><div>             176.gcc                2203                2315      5.08%</div><div>             181.mcf                1625                1737      6.85%</div>
<div>          186.crafty                2411                2307     -4.30%</div><div>          197.parser                1173                1166     -0.57%</div><div>             252.eon                2245                2464      9.72%</div>
<div>         253.perlbmk                2214                2444     10.37%</div><div>             254.gap                1987                1978     -0.47%</div><div>          255.vortex                2497                2422     -3.00%</div>
<div>           256.bzip2                1585                1740      9.80%</div><div>           300.twolf                2294                2281     -0.58%</div></div><div><br></div><div>As you can see, LLVM beats gcc in vpr, crafty and vortex by about 3%, but falls behind gcc in gzip, gcc, mcf, eon, perfbmk, and bzip2 by a large margin.</div>
<div><br></div><div><br></div><div>32bit:</div><div>                                           llvm                   gcc        gcc vs llvm</div><div><div>            164.gzip                1210                1239      2.44%</div>
<div>             175.vpr                1662                1621     -2.42%</div><div>             181.mcf                2733                3109     13.75%</div><div>          186.crafty                1812                1721     -5.00%</div>
<div>          197.parser                1328                1289     -2.92%</div><div>         253.perlbmk                2086                2580     23.67%</div><div>             254.gap                1968                1912     -2.86%</div>
<div>          255.vortex                1842                1965      6.66%</div><div>           256.bzip2                1440                1553      7.82%</div><div>           300.twolf                2284                2213     -3.08%</div>
</div><div><br></div><div>It beats gcc in vpr, crafty, parser, gap, and twolf by ~3%, but falls behind  gcc in gzip, mcf, perlbmk, vortex, and bzip2. Some of them have very large performance gap.  eon and gcc mis-compile.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>David</div>