[llvm] [AMDGPU] Fold saddsat(x, -C) to ssubsat(x, C) when C is an inline constant (PR #216592)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 01:24:16 PDT 2026


https://github.com/arsenm approved this pull request.

Maybe test v2i16 / v3i16 with this pattern. IIRC you won't be able to use clamp to implement this, since op_sel has the usual operand select behavior. 

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


More information about the llvm-commits mailing list