[llvm] [AMDGPU] 32-bit ABS is a legal DAG node (PR #163907)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 16 21:55:59 PDT 2025


================
@@ -14945,6 +14945,13 @@ SDValue SITargetLowering::performMinMaxCombine(SDNode *N,
     }
   }
 
+  // max(x, neg(x)) -> abs(x)
----------------
shiltian wrote:

I don't see any AMDGPU specific ISD here so why can't this be done in the generic combine part?

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


More information about the llvm-commits mailing list