[llvm] [AArch64][SelectionDAG] Generate subs+csel for usub.sat (PR #193203)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 05:06:35 PDT 2026


================
@@ -3596,6 +3595,10 @@ class LLVM_ABI TargetLoweringBase {
     return false;
   }
 
+  /// Should usub.sat(X, 1) prefer the generic lowering X - zext(X != 0) over
+  /// the default overflow/select expansion?
+  virtual bool preferSubOfZextForUsubSatOne(EVT VT) const { return true; }
----------------
arsenm wrote:

You can probably reason this out based on existing hooks 

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


More information about the llvm-commits mailing list