diff options
author | Iris <0.0@owo.li> | 2025-03-15 13:40:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-15 13:40:35 +0800 |
commit | 1762f16f6cc497255b5ba4e68372717db0448112 (patch) | |
tree | e2d8309d6a5b2ace78a3f0656e14edb2825ea723 /llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | |
parent | 215c47e4d3b26b780c7019c050bcae874ca2084d (diff) | |
download | llvm-1762f16f6cc497255b5ba4e68372717db0448112.zip llvm-1762f16f6cc497255b5ba4e68372717db0448112.tar.gz llvm-1762f16f6cc497255b5ba4e68372717db0448112.tar.bz2 |
[InstCombine] Fold `umax/umin(nuw_shl(z, x), nuw_shl(z, y)) -> nuw_shl(z, umax/umin(x, y))` and `umax/umin(nuw_shl(x, z), nuw_shl(y, z)) -> nuw_shl(umax/umin(x, y), z)` (#131076)
- Closes #129947
This PR introduces the following transformations:
1. `umax(nuw_shl(z, x), nuw_shl(z, y)) -> nuw_shl(z, umax(x, y))`
2. `umin(nuw_shl(z, x), nuw_shl(z, y)) -> nuw_shl(z, umin(x, y))`
3. `umax(nuw_shl(x, z), nuw_shl(y, z)) -> nuw_shl(umax(x, y),z)`
4. `umin(nuw_shl(x, z), nuw_shl(y, z)) -> nuw_shl(umin(x, y),z)`
Alive2 live proof:
- https://alive2.llvm.org/ce/z/6bM-p7 for 1 and 2
- https://alive2.llvm.org/ce/z/aqLRYA and
https://alive2.llvm.org/ce/z/twoVhb for 3 and 4 repectively
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp')
0 files changed, 0 insertions, 0 deletions