[llvm] [DAG] Fold (umin (sub a b) a) -> (usubo a b); (select usubo.1 a usubo.0) (PR #161651)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 10 11:50:31 PST 2025
================
@@ -6219,6 +6219,25 @@ SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
SDLoc(N), VT, N0, N1))
return SD;
+ if (TLI.isOperationLegalOrCustom(ISD::USUBO, VT) &&
----------------
arsenm wrote:
Mostly I'm wondering how to get this to fire in the 64-bit amdgpu case. usubo isn't legal, but expanding the 64-bit usubo is as good as expanding the min
https://github.com/llvm/llvm-project/pull/161651
More information about the llvm-commits
mailing list