[llvm] [InstCombine] Fold `umax/umin(nuw_shl(base, x), nuw_shl(base, y)) -> nuw_shl(base, umax/umin(x, y))` (PR #131076)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 13 07:01:14 PDT 2025
- Previous message: [llvm] [InstCombine] Fold `umax/umin(nuw_shl(base, x), nuw_shl(base, y)) -> nuw_shl(base, umax/umin(x, y))` (PR #131076)
- Next message: [llvm] [InstCombine] Fold `umax/umin(nuw_shl(base, x), nuw_shl(base, y)) -> nuw_shl(base, umax/umin(x, y))` (PR #131076)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
el-ev wrote:
> Can we handle this in foldIntrinsicUsingDistributiveLaws instead? It currently assumes commutative ops, but if we drop that assumption we can handle the shift case there as well.
I'm not quite sure how to modify that function to achieve this, as it not only assumes the inner ops are commutative but also tries to swap their operands.
https://github.com/llvm/llvm-project/pull/131076
- Previous message: [llvm] [InstCombine] Fold `umax/umin(nuw_shl(base, x), nuw_shl(base, y)) -> nuw_shl(base, umax/umin(x, y))` (PR #131076)
- Next message: [llvm] [InstCombine] Fold `umax/umin(nuw_shl(base, x), nuw_shl(base, y)) -> nuw_shl(base, umax/umin(x, y))` (PR #131076)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list