[llvm] [DAG] Fold trunc(abdu(x, y)) and trunc(abds(x, y)) if they have sufficient leading zero/sign bits (PR #151471)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 00:08:59 PDT 2025
================
@@ -16275,6 +16317,10 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
if (SDValue NewVSel = matchVSelectOpSizesWithSetCC(N))
return NewVSel;
+ // fold trunc (ABDU/S A, B)) → ABDU/S (trunc A), (trunc B)
+ if (SDValue V = foldAbdToNarrowType(VT, N, SDLoc(N)))
----------------
woruyu wrote:
Done!
https://github.com/llvm/llvm-project/pull/151471
More information about the llvm-commits
mailing list