[REVISED][PATCH/RFT] Fix PR middle-end/PR28690, modify swap_commutative_operands_p

H. J. Lu hjl@lucon.org
Mon Jun 11 05:17:00 GMT 2007


On Fri, Jun 08, 2007 at 10:53:48PM -0500, Peter Bergner wrote:
> On Mon, Jun 04, 2007 at 02:40:05PM -0500, Peter Bergner wrote:
> > On Sun, May 06, 2007 at 01:21:16PM -0700, H. J. Lu wrote:
> > > Here are what I got on Core 2 Duo with -O2 -ffast-math:
> > > 
> > > 2. SPEC CPU 2000 cores
> > [snip]
> > > 168.wupwise                      -6.56276%
> > 
> > Well, we found a Core 2 Duo box here and we're not seeing as big
> > a degradation as you are (-3.9%), but we seem to have narrowed
> > down one slowdown and created a C testcase that seems to mimic the
> > slowdown.  Can you confirm that the testcase below runs slower
> > for you too.  Also, we don't know the x86/x86_64 arch that well,
> > so can you tell us why the code is running slower so I can attempt
> > to modify the patch so it doesn't?  Thanks.
> 
> 
> On Fri, Jun 08, 2007 at 03:26:17PM -0700, H. J. Lu wrote:
> > With revision 125027, I got the following on Core 2 Duo 64bit:
> > 
> > 			(r125027 + patch - r125027)/125027
> 
> Strange how the numbers are jumping around from your previous
> numbers given the newer mainline revision.  Anyway, having
> looked at the wupwise slowdown from before, it seems the
> (set X (X Y)) swapping in swap_commutative_operands_with_target
> is still important, so I reverted that part of the patch and
> early indications are that it doesn't seem to affect our POWER6
> numbers and it seems to fix the wupwise slowdown you were seeing.
> So can I ask you to try the updated patch below and see how that
> compares with the previous one?  Thanks.
> 

On 64bit Core 2 Duo, using -O2 -ffast-math, for SPEC CPU 2000, I
got

			(r125577 + patch - r125577)/r125577
164.gzip                         -0.0645995%
175.vpr                          -0.0541126%
176.gcc                          -2.00373%
181.mcf                          -0.380022%
186.crafty                       -0.248668%
197.parser                       0.78853%
252.eon                          1.41844%
253.perlbmk                      0.0720981%
254.gap                          1.0159%
255.vortex                       1.49547%
256.bzip2                        -0.826446%
300.twolf                        -0.248227%
SPECint_base2000                         0.0912825%

168.wupwise                      0.670017%
171.swim                         0.0420168%
172.mgrid                        0.567537%
173.applu                        0.44843%
177.mesa                         0.146735%
178.galgel                       -0.724802%
179.art                          -4.48607%
183.equake                       -0.12848%
187.facerec                      -0.0367242%
188.ammp                         -1.29745%
189.lucas                        0%
191.fma3d                        -3.53122%
200.sixtrack                     -3.96476%
301.apsi                         -0.561224%
SPECfp_base2000                          -0.927097%

For SPEC CPU 2006,

400.perlbench                    1.48515%
401.bzip2                        -0.613497%
403.gcc                          0%
429.mcf                          0%
445.gobmk                        0%
456.hmmer                        0.8%
458.sjeng                        0.571429%
462.libquantum                   0%
464.h264ref                      0.395257%
471.omnetpp                      0%
473.astar                        -0.869565%
483.xalancbmk                    -0.420168%
SPECint(R)_base2006                      0%

410.bwaves                       0%
416.gamess                       -1.15607%
433.milc                         0%
434.zeusmp                       0.657895%
435.gromacs                      -0.862069%
436.cactusADM                    -2.88462%
437.leslie3d                     -0.216216%
444.namd                         -0.675676%
447.dealII                       -4.65116%
450.soplex                       0%
453.povray                       1.5%
454.calculix                     -8.0207%
459.GemsFDTD                     0%
465.tonto                        0%
470.lbm                          0%
481.wrf                          0.934579%
482.sphinx3                      0.510204%
SPECfp(R)_base2006                       -1.50376%


H.J.



More information about the Gcc-patches mailing list