aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorLuke Lau <luke@igalia.com>2024-03-26 23:28:04 +0800
committerGitHub <noreply@github.com>2024-03-26 23:28:04 +0800
commit87519a2830eab4b634a5816f53fe773929eed531 (patch)
tree05fef64bb0dc01079e420b147ae32e76ae30236c /clang/lib/CodeGen/CodeGenFunction.cpp
parentecfffbfd3921fd47f3afc1d03a7518b34ec396b3 (diff)
downloadllvm-87519a2830eab4b634a5816f53fe773929eed531.zip
llvm-87519a2830eab4b634a5816f53fe773929eed531.tar.gz
llvm-87519a2830eab4b634a5816f53fe773929eed531.tar.bz2
[RISCV] Combine (mul (zext, zext)) -> (zext (mul (zext, zext))) (#86465)
Building on #86248, we can also narrow the width of a mul of zexts. This is specifically legal because on RVV we always extend to the next power of 2 width, and multiplying two N bit integers produces a maximum value of 2\*N bits. So as long as we keep an inner zext of 2\*N, we will have enough space for the multiply and won't overflow. Alive2 proof: https://alive2.llvm.org/ce/z/XteYyb
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions