[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 13 05:19:38 PST 2025
================
@@ -21962,6 +21962,35 @@ SDValue tryLowerPartialReductionToWideAdd(SDNode *N,
return DAG.getNode(TopOpcode, DL, AccVT, BottomNode, ExtOp);
}
+static SDValue foldRevInvolution(SDNode *N) {
+ SDValue InnerRev = N->getOperand(1);
+ if (!InnerRev.hasOneUse())
+ return SDValue();
----------------
MacDue wrote:
Does it matter if the inner rev has more than one use? This only replaces the outer rev, so if there's another use of the inner rev it should be preserved.
https://github.com/llvm/llvm-project/pull/116422
More information about the llvm-commits
mailing list