diff options
author | Craig Topper <craig.topper@sifive.com> | 2024-04-10 08:39:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-10 08:39:56 -0700 |
commit | 7f1b9adfc8d86c77ee87a268b3d30e0eda8ed493 (patch) | |
tree | 648af4a61bd5c817e1a36692bc32213638b09031 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 6ca5a410d26262f06f954e91200eefe0cbfb7fb8 (diff) | |
download | llvm-7f1b9adfc8d86c77ee87a268b3d30e0eda8ed493.zip llvm-7f1b9adfc8d86c77ee87a268b3d30e0eda8ed493.tar.gz llvm-7f1b9adfc8d86c77ee87a268b3d30e0eda8ed493.tar.bz2 |
[RISCV] Add MachineCombiner to fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (#87884)
This improves a pattern that occurs in 531.deepsjeng_r. Reducing the
dynamic instruction count by 0.5%.
This may be possible to improve in SelectionDAG, but given the special
cases around shXadd formation, it's not obvious it can be done in a
robust way without adding multiple special cases.
I've used a GEP with 2 indices because that mostly closely resembles the
motivating case. Most of the test cases are the simplest GEP case. One
test has a logical right shift on an index which is closer to the
deepsjeng code. This requires special handling in isel to reverse a
DAGCombiner canonicalization that turns a pair of shifts into (srl (and
X, C1), C2).
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions