aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-02-22 16:17:48 -0800
committerGitHub <noreply@github.com>2024-02-22 16:17:48 -0800
commitac518c7c9916a6fde1d898b8c53b74298fd00d5f (patch)
tree323cc71c50ff17f8d12a18ed679a9b3d347fb347 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parentcd1d4d8dd31f527615de26f5b62d687c6b2982a6 (diff)
downloadllvm-ac518c7c9916a6fde1d898b8c53b74298fd00d5f.zip
llvm-ac518c7c9916a6fde1d898b8c53b74298fd00d5f.tar.gz
llvm-ac518c7c9916a6fde1d898b8c53b74298fd00d5f.tar.bz2
[RISCV] Vector sub (zext, zext) -> sext (sub (zext, zext)) (#82455)
This is legal as long as the inner zext retains at least one bit of increase so that the sub overflow case (0 - UINT_MAX) can be represented. Alive2 proof: https://alive2.llvm.org/ce/z/BKeV3W For RVV, restrict this to power of two sizes with the operation type being at least e8 to stick to legal extends. We could arguably handle i1 source types with some care if we wanted to. This is likely profitable because it may allow us to perform the sub instruction in a narrow LMUL (equivalently, in fewer DLEN-sized pieces) before widening for the user. We could arguably avoid narrowing below DLEN, but the transform should at worst introduce one extra extend and one extra vsetvli toggle if the source could previously be handled via loads explicit w/EEW.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions