[llvm] [AMDGPU][TargetLowering] Allow forming overflow op if it is legal (PR #156266)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 23 05:45:14 PDT 2025
================
@@ -9788,7 +9788,8 @@ SDValue TargetLowering::expandABD(SDNode *N, SelectionDAG &DAG) const {
// flag if the (scalar) type is illegal as this is more likely to legalize
// cleanly:
// abdu(lhs, rhs) -> sub(xor(sub(lhs, rhs), uof(lhs, rhs)), uof(lhs, rhs))
- if (!IsSigned && VT.isScalarInteger() && !isTypeLegal(VT)) {
+ if (!IsSigned && (isOperationLegal(ISD::USUBO, VT) ||
----------------
arsenm wrote:
This is an unrelated change?
https://github.com/llvm/llvm-project/pull/156266
More information about the llvm-commits
mailing list