[llvm] [AMDGPU][TargetLowering] Allow forming overflow op if it is legal (PR #156266)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 23 05:46:54 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) ||
----------------
AZero13 wrote:
Thought it affected codegen but nope. Thanks.
https://github.com/llvm/llvm-project/pull/156266
More information about the llvm-commits
mailing list