[llvm] [AMDGPU] 32-bit ABS is a legal DAG node (PR #163907)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 16 21:53:32 PDT 2025
================
@@ -14945,6 +14945,13 @@ SDValue SITargetLowering::performMinMaxCombine(SDNode *N,
}
}
+ // max(x, neg(x)) -> abs(x)
----------------
LU-JOHN wrote:
> Can we do this in the generic part?
All ISD::SMAX nodes are sent to this function from the switch in PerformDAGCombine. I don't see where else to put it. This function is intended to process min or max nodes so it makes sense to put it here.
https://github.com/llvm/llvm-project/pull/163907
More information about the llvm-commits
mailing list