[llvm] [InstCombine] Fold `A == MIN_INT ? MAX_INT : 0 - A` to `ssub_sat 0, A` (PR #194519)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 07:34:36 PDT 2026


================
@@ -510,6 +510,19 @@ inline api_pred_ty<is_maxsignedvalue> m_MaxSignedValue(const APInt *&V) {
   return V;
 }
 
+struct is_minsignedvalue {
+  bool isValue(const APInt &C) const { return C.isMinSignedValue(); }
----------------
dtcxzyw wrote:

Use `m_SignMask` instead.


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


More information about the llvm-commits mailing list