[llvm] [AMDGPU] Improved Lowering of abs(i8/i16) and -abs(i8/i16) (PR #165626)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 07:17:58 PDT 2026


================
@@ -5739,8 +5739,8 @@ class LLVM_ABI TargetLowering : public TargetLoweringBase {
   /// \param N Node to expand
   /// \param IsNegative indicate negated abs
   /// \returns The expansion result or SDValue() if it fails.
-  SDValue expandABS(SDNode *N, SelectionDAG &DAG,
-                    bool IsNegative = false) const;
+  virtual SDValue expandABS(SDNode *N, SelectionDAG &DAG,
+                            bool IsNegative = false) const;
----------------
RKSimon wrote:

I'm still not convinced you need to override this

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


More information about the llvm-commits mailing list