[PATCH, MIPS] Use dmult in 64-bit signed widening multiplication

Adam Nemet anemet@caviumnetworks.com
Wed Oct 14 17:58:00 GMT 2009


Richard Sandiford writes:
> Adam Nemet <anemet@caviumnetworks.com> writes:
> > Taking this one step further I am not sure there is any benefit of
> > implementing mulsidi3 for 64-bit with DMULT.  We're really just reiterating
> > what's already optimized in the backend that sign-extension is a move.
> > I.e. if we FAILed in the expander for this case, the sign-extension on the
> > input operands should be removed most of the time.  I'll benchmark this a
> > little more.
> 
> Yeah, I wondered about suggesting that too, but when I last looked
> at it, we weren't getting rid of sign extensions as often as we'd like.
> That was with the old register allocators though; IRA could well have
> made things better.

Yes, it seems the difference is still not negligible on CSiBE:

$ csibe-compare build-mulsidi3-O2/result-size.csv build-no-mulsidi3-O2/result-size.csv |grep -v "100.00"
flex-2.5.31:tblcmp                                   5016    5008 :      99.84%
jikespg-1.3:src/remsp                                9976    9984 :     100.08%
jikespg-1.3:src/timetab                             11944   11952 :     100.07%
jikespg-1.3:src/mkfirst                             19232   19280 :     100.25%
jikespg-1.3:src/lpgparse                            59016   59328 :     100.53%
jikespg-1.3:src/mkstates                             4056    4064 :     100.20%
jikespg-1.3:src/produce                             14784   14832 :     100.32%
jikespg-1.3:src/ptables                              3976    3984 :     100.20%
jikespg-1.3:src/spacetab                            24904   24912 :     100.03%
jpeg-6b:jidctfst                                     1280    1344 :     105.00%
jpeg-6b:jidctred                                     2216    2264 :     102.17%
jpeg-6b:jfdctfst                                      656     696 :     106.10%
libpng-1.2.5:pngset                                  8096    8104 :     100.10%
libpng-1.2.5:png                                     4016    4024 :     100.20%
libpng-1.2.5:pngrtran                               26840   26848 :     100.03%
libpng-1.2.5:pngrutil                               22660   22668 :     100.04%
linux-2.4.23-pre3-testplatform:fs/ext3/balloc        5224    5240 :     100.31%
linux-2.4.23-pre3-testplatform:mm/mmap               6788    6780 :      99.88%
linux-2.4.23-pre3-testplatform:ipc/sem               6664    6672 :     100.12%
linux-2.4.23-pre3-testplatform:net/ipv4/inetpeer     2776    2792 :     100.58%
linux-2.4.23-pre3-testplatform:net/ipv4/tcp         26900   26948 :     100.18%
linux-2.4.23-pre3-testplatform:arch/testplatform/    3040    3048 :     100.26%
linux-2.4.23-pre3-testplatform:drivers/char/tty_i   15112   15120 :     100.05%
linux-2.4.23-pre3-testplatform:drivers/block/blkp    1592    1600 :     100.50%
mpeg2dec-0.3.1:libmpeg2/header                       5544    5560 :     100.29%
teem-1.6.0-src:src/air/enum                          1496    1512 :     101.07%
teem-1.6.0-src:src/dye/convertDye                    4016    4024 :     100.20%
teem-1.6.0-src:src/alan/coreAlan                     6016    6024 :     100.13%
teem-1.6.0-src:src/bane/hvol                         8672    8720 :     100.55%
teem-1.6.0-src:src/hest/parseHest                   19512   19520 :     100.04%
teem-1.6.0-src:src/limn/io                           1040    1064 :     102.31%
teem-1.6.0-src:src/limn/test/soid                    4840    4888 :     100.99%
teem-1.6.0-src:src/limn/obj                          1428    1444 :     101.12%
teem-1.6.0-src:src/limn/renderLimn                   4232    4280 :     101.13%
teem-1.6.0-src:src/limn/transform                    2712    2728 :     100.59%
teem-1.6.0-src:src/nrrd/encodingAscii                2336    2344 :     100.34%
teem-1.6.0-src:src/nrrd/apply1D                     10672   10688 :     100.15%
teem-1.6.0-src:src/nrrd/resampleNrrd                 8968    8976 :     100.09%

Total                                             4020249 4021265 :     100.03%

Adam



More information about the Gcc-patches mailing list