[PATCH] D138660: [MachineCombiner][RISCV] Support inverse instructions reassociation
Anton Sidorenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 08:46:13 PST 2022
asi-sc added reviewers: craig.topper, asb.
asi-sc added a comment.
Herald added a subscriber: StephenFan.
Since we've moved RISCV reassociation implementation to generic machine combiner mechanism D138302 <https://reviews.llvm.org/D138302> and added reassociation of inverse instructions to machine combiner in D136754 <https://reviews.llvm.org/D136754>, we now can enable reassociation of inverse for RISCV.
Performance measurements for Whetstone
N1 +8%
N2 +14%
Baseline
Loop content Result MFLOPS MOPS Seconds
N1 floating point -1.12398255667391900 284.545 0.694
N2 floating point -1.12187079889295083 224.314 6.162
N3 if then else 1.00000000000000000 5715.791 0.186
N4 fixed point 12.00000000000000000 323977497.600 0.000
N5 sin,cos etc. 0.49902937281518078 20.796 41.147
N6 floating point 0.99999987890802811 169.611 32.708
N7 assignments 3.00000000000000000 7136.783 0.266
N8 exp,sqrt etc. 0.75100163018453681 21.396 17.882
MWIPS
1038.403 99.046
This patch
Loop content Result MFLOPS MOPS Seconds
N1 floating point -1.12398255667392588 308.002 0.652
N2 floating point -1.12187079889289487 257.436 5.460
N3 if then else 1.00000000000000000 5714.154 0.189
N4 fixed point 12.00000000000000000 299507735.273 0.000
N5 sin,cos etc. 0.49902937281518078 20.861 41.714
N6 floating point 0.99999987890802811 170.068 33.173
N7 assignments 3.00000000000000000 7176.013 0.269
N8 exp,sqrt etc. 0.75100163018453681 21.117 18.425
MWIPS 1047.136 99.882
Compilation flags `-O3 -funroll-loops -finline-functions -ffast-math -mtune=sifive-u74`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138660/new/
https://reviews.llvm.org/D138660
More information about the llvm-commits
mailing list