[llvm] [SDAG] (setcc (sub nsw a, b), zero, s??) -> (setcc a, b, s??) (PR #175459)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 12 07:13:51 PST 2026
- Previous message: [llvm] [SDAG] (setcc (sub nsw a, b), zero, s??) -> (setcc a, b, s??) (PR #175459)
- Next message: [llvm] [SDAG] (setcc (sub nsw a, b), zero, s??) -> (setcc a, b, s??) (PR #175459)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
================
@@ -5668,6 +5668,12 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
return DAG.getSetCC(dl, VT, N0.getOperand(0), N1.getOperand(0), Cond);
}
+ // Fold (setcc (sub nsw a, b), zero, s??) -> (setcc a, b, s??)
+ if (VT.isVector() && isZeroOrZeroSplat(N1) && N0.getOpcode() == ISD::SUB &&
----------------
RKSimon wrote:
Add a TODO to remove the isVector() limit
https://github.com/llvm/llvm-project/pull/175459
- Previous message: [llvm] [SDAG] (setcc (sub nsw a, b), zero, s??) -> (setcc a, b, s??) (PR #175459)
- Next message: [llvm] [SDAG] (setcc (sub nsw a, b), zero, s??) -> (setcc a, b, s??) (PR #175459)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list