This patch adds reassociation of FADD/FSUB instruction pairs.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This patch is created to demonstrate the approach. So, I'm intentionally didn't add reviewers. However, it's possible that we'll follow the path this patch shows, so I don't abandon it immediately.
Comment Actions
Since we've moved RISCV reassociation implementation to generic machine combiner mechanism D138302 and added reassociation of inverse instructions to machine combiner in 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