[llvm] [DAG] Matched FixedWidth pattern for ISD::AVGFLOORU (PR #84903)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 03:51:47 PDT 2024
================
@@ -2821,6 +2821,47 @@ SDValue DAGCombiner::visitADDLike(SDNode *N) {
return SDValue();
}
+// Attempt to form avgflooru(A, B) from add(and(A, B), lshr(xor(A, B), 1))
+static SDValue combineFixedwidthToAVGFLOORU(SDNode *N, SelectionDAG &DAG) {
+ assert(N->getOpcode() == ISD::ADD and "ADD node is required here");
----------------
jayfoad wrote:
Please use `&&` instead of `and` (and similar) throughout your code!
https://github.com/llvm/llvm-project/pull/84903
More information about the llvm-commits
mailing list