[llvm] [InstCombine] Simplify zext(sub(0, trunc(x))) -> and(sub(0, x), mask) (PR #167101)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 07:34:00 PST 2025


RKSimon wrote:

tbh - I'd consider this particular pattern a canonicalization as it removes type conversions entirely.

But if there's concerns that tweaking shouldChangeType might affect a lot more cases, we can investigate a suitable VectorCombine pattern instead.

https://github.com/llvm/llvm-project/pull/167101


More information about the llvm-commits mailing list