[llvm] [RISCV] Fold (add (srl x, n), (srl x, n)) into (srl x, n-1) (PR #144507)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 09:14:27 PDT 2025
================
@@ -15240,12 +15240,42 @@ static SDValue combineAddOfBooleanXor(SDNode *N, SelectionDAG &DAG) {
N0.getOperand(0));
}
+// Try to turn (add (srl x, n), (srl x, n)) into (srl x, n-1).
+//
+// This combine could perhaps be moved to DAGCombiner. For RISCV this kind of
----------------
topperc wrote:
RISCV should be spelled RISC-V in comments. It's a trademark.
https://github.com/llvm/llvm-project/pull/144507
More information about the llvm-commits
mailing list