[llvm] Fix unassigned add handling in aarch64 (PR #86636)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 05:10:08 PDT 2024
================
@@ -5279,6 +5279,13 @@ SDValue DAGCombiner::visitAVG(SDNode *N) {
DAG.getNode(ISD::ADD, DL, VT, N0, DAG.getAllOnesConstant(DL, VT)));
}
+ // Fold shadd(x,y) -> uhadd(x,y) if both x and y are non-negative
+ if (Opcode == ISD::SHADD && !hasOperation(ISD::SHADD, VT) &&
----------------
RKSimon wrote:
This should be ISD::AVGFLOORS + ISD::AVGFLOORU
https://github.com/llvm/llvm-project/pull/86636
More information about the llvm-commits
mailing list