aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-04-15 17:38:39 -0700
committerGitHub <noreply@github.com>2024-04-15 17:38:39 -0700
commit2b06ff555aa32b316710b4708fbc16f36d6eab15 (patch)
treeedd5701aaca7f221f30e9145e5ca4ff383b34888 /clang/lib/CodeGen/CodeGenModule.cpp
parentc50f7e9a425bfa4ab8655c79a715c88ed3b1e830 (diff)
downloadllvm-2b06ff555aa32b316710b4708fbc16f36d6eab15.zip
llvm-2b06ff555aa32b316710b4708fbc16f36d6eab15.tar.gz
llvm-2b06ff555aa32b316710b4708fbc16f36d6eab15.tar.bz2
[RISCV] Expand mul to shNadd x, (slli x, c) in DAGCombine (#88524)
This expansion is directly inspired by the analogous code in the x86 backend for LEA. shXadd and (this sub-case of) LEA are largely equivalent. This is an alternative to https://github.com/llvm/llvm-project/pull/87105. This expansion is also supported via the decomposeMulByConstant callback, but restricted because of interactions with other combines since that code runs before legalization. As discussed in the other review, my original plan had been to support post legalization expansion through the same interface, but that ended up being more complicated than seems justified. Instead, lets go ahead and do the general expansion post-legalize. Other targets use the combine approach, and matching that structure makes it easier for us to adapt ideas from other targets to RISCV.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions