[all-commits] [llvm/llvm-project] 1762f1: [InstCombine] Fold `umax/umin(nuw_shl(z, x), nuw_...
Iris via All-commits
all-commits at lists.llvm.org
Fri Mar 14 22:40:58 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1762f16f6cc497255b5ba4e68372717db0448112
https://github.com/llvm/llvm-project/commit/1762f16f6cc497255b5ba4e68372717db0448112
Author: Iris <0.0 at owo.li>
Date: 2025-03-15 (Sat, 15 Mar 2025)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
M llvm/test/Transforms/InstCombine/div-shift.ll
M llvm/test/Transforms/InstCombine/intrinsic-distributive.ll
A llvm/test/Transforms/InstCombine/shift-uminmax.ll
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list