[PATCH] D136764: [MachineCombiner][RISCV] Add fmadd/fmsub/fnmsub instructions patterns

Anton Sidorenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 06:36:28 PDT 2022


asi-sc added reviewers: craig.topper, reames, frasercrmck.
asi-sc added a comment.
Herald added a subscriber: StephenFan.

Performance impact on Whetstone (double-precision) for sifive-u74 `-march=rv64imafdc -O3 -funroll-loops -finline-functions -ffast-math -DDP -mtune=sifive-u74`: 
N1 +67%
N2 +45% 
MWIPS +18%

Baseline

  Loop content                  Result              MFLOPS      MOPS   Seconds
  
  N1 floating point     -1.12398255667391900       285.015              0.700
  N2 floating point     -1.12187079889295083       224.672              6.220
  N3 if then else        1.00000000000000000                5725.464    0.188
  N4 fixed point        12.00000000000000000               327505510.400    0.000
  N5 sin,cos etc.        0.49902937281518078                  20.516   42.163
  N6 floating point      0.99999987890802811       169.612             33.064
  N7 assignments         3.00000000000000000                7123.768    0.270
  N8 exp,sqrt etc.       0.75100163018453681                  21.097   18.333
  
  MWIPS                                           1030.036            100.938

This patch

  Loop content                  Result              MFLOPS      MOPS   Seconds
  
  N1 floating point     -1.12398255667393077       476.923              0.498
  N2 floating point     -1.12187079889296992       325.987              5.098
  N3 if then else        1.00000000000000000                7110.547    0.180
  N4 fixed point        12.00000000000000000               299613459.692    0.000
  N5 sin,cos etc.        0.49902937281518367                  19.847   51.836
  N6 floating point      0.99999987890802855       307.010             21.725
  N7 assignments         3.00000000000000000               28396.673    0.080
  N8 exp,sqrt etc.       0.75100163018453681                  21.007   21.897
  
  MWIPS                                           1220.474            101.313


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136764/new/

https://reviews.llvm.org/D136764



More information about the llvm-commits mailing list