Hi, There are some Thumb2 patterns in vfp.md which are duplicated with only minor changes from their ARM equivalents. This patch adds requirement in "*thumb2_movdf_vfp" pattern, that one of the operands sould be register, like in ARM "*movdf_vfp" pattern.
There is one functional change: the ARM "*movdf_vfp" pattern disallows the [mem]=const store case while the Thumb2 one does not. The ARM version is more desirable, because [mem]=const would be split anyway and add temporary vfp register. Example: double delta; void foo () { delta = 0.0; } Generated code (without patch): Compiler options: g++ -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb -O2 movs r0, #0 movs r1, #0 fmdrr d16, r0, r1 fstd d16, [r3, #0] Generated code (with patch): movs r0, #0 movs r1, #0 strd r0, [r3] Regtested with QEMU-ARM. Code size: SPEC2K INT and FP sizes both decrease by ~0.2% (up to 2.64% on 252.eon). Performance: 252.eon +4.3%, other tests almost unaffected; SPEC2K FP grows by 0.16% (up to 1.8% on 183.equake). (Detailed data below). Ok for trunk? Base Peak Benchmarks Size Size ---------- ------- ------- 164.gzip 33223 33223 0 0,000% 175.vpr 108947 108947 0 0,000% 176.gcc 936220 936220 0 0,000% 181.mcf 7768 7768 0 0,000% 186.crafty 158714 158714 0 0,000% 197.parser 66371 66371 0 0,000% 252.eon 239982 233646 6336 2,640% 253.perlbmk 367652 367628 24 0,007% 254.gap 311193 311193 0 0,000% 255.vortex 349276 349268 8 0,002% 256.bzip2 23044 23044 0 0,000% 300.twolf 144094 143990 104 0,072% SPECint2000 2746484 2740012 6472 0,236% Base Peak Benchmarks Size Size ---------- ------- ------- 168.wupwise 17541 17541 0 0,000% 171.swim 8662 8686 -24 -0,277% 172.mgrid 10072 10088 -16 -0,159% 173.applu 43193 42585 608 1,408% 177.mesa 337863 337735 128 0,038% 178.galge l123270 122854 416 0,337% 179.art 11762 11686 76 0,646% 183.equake 14836 14620 216 1,456% 187.facerec 44554 44554 0 0,000% 188.ammp 85940 85612 328 0,382% 189.lucas 31764 31700 64 0,201% 191.fma3d 662349 662215 134 0,020% 200.sixtrack 713980 712324 1656 0,232% 301.apsi 74277 73997 280 0,377% SPECfp2000 2153860 2149970 3890 0,181% Base Peak Benchmarks Size Size ---------- ------- ------- 252.eon 0.7 0.67 0.3 4.286% SPECint2000 4.286% 168.wupwise 18,16 18,04 0,12 0,661% 171.swim 1,5 1,52 -0,02 -1,333% 172.mgrid 40,33 40,39 -0,06 -0,149% 173.applu 0,54 0,55 -0,01 -1,852% 177.mesa 2,56 2,57 -0,01 -0,391% 178.galgel 22,1 22 0,1 0,452% 179.art 12,39 12,29 0,1 0,807% 183.equake 2,25 2,21 0,04 1,778% 187.facerec 10,25 10,21 0,04 0,390% 188.ammp 22,21 22,1 0,11 0,495% 189.lucas 6,26 6,25 0,01 0,160% 191.fma3d 0,645 0,648 -0,003 -0,465% 200.sixtrack 16,19 16,2 -0,01 -0,062% 301.apsi 10,84 10,92 -0,08 -0,738% SPECfp2000 146.565 146.338 0.227 0.155% -- Best Regards, Ruben. <ru...@ispras.ru>
thumb2_movdf_vfp.diff
Description: Binary data