aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunctionSplitter.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-04-23 07:36:45 -0700
committerPhilip Reames <listmail@philipreames.com>2024-04-23 08:30:38 -0700
commit03760ad09d49f74c026f0b5d41d982cad81c67d7 (patch)
treeec8b84a3ce09199a68f782cceabaa193c1d602ca /llvm/lib/CodeGen/MachineFunctionSplitter.cpp
parent1d7086e475c76046b58f4e1c5568720f1c67ad55 (diff)
downloadllvm-03760ad09d49f74c026f0b5d41d982cad81c67d7.zip
llvm-03760ad09d49f74c026f0b5d41d982cad81c67d7.tar.gz
llvm-03760ad09d49f74c026f0b5d41d982cad81c67d7.tar.bz2
Reapply "[RISCV] Implement RISCVISD::SHL_ADD and move patterns into combine (#89263)"
Changes since original commit: * Rebase over improved test coverage for theadba * Revert change to use TargetConstant as it appears to prevent the uimm2 clause from matching in the XTheadBa patterns. * Fix an order of operands bug in the THeadBa pattern visible in the new test coverage. Original commit message follows: This implements a RISCV specific version of the SHL_ADD node proposed in https://github.com/llvm/llvm-project/pull/88791. If that lands, the infrastructure from this patch should seamlessly switch over the to generic DAG node. I'm posting this separately because I've run out of useful multiply strength reduction work to do without having a way to represent MUL X, 3/5/9 as a single instruction. The majority of this change is moving two sets of patterns out of tablgen and into the post-legalize combine. The major reason for this is that I have an upcoming change which needs to reuse the expansion logic, but it also helps common up some code between zba and the THeadBa variants. On the test changes, there's a couple major categories: * We chose a different lowering for mul x, 25. The new lowering involves one fewer register and the same critical path, so this seems like a win. * The order of the two multiplies changes in (3,5,9)*(3,5,9) in some cases. I don't believe this matters. * I'm removing the one use restriction on the multiply. This restriction doesn't really make sense to me, and the test changes appear positive.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionSplitter.cpp')
0 files changed, 0 insertions, 0 deletions