[clang] [llvm] [mlir] [AArch64][SME] Improve codegen for aarch64.sme.cnts* when not in streaming mode (PR #154761)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 5 07:57:19 PDT 2025


================
@@ -937,6 +940,26 @@ bool AArch64DAGToDAGISel::SelectRDVLImm(SDValue N, SDValue &Imm) {
   return false;
 }
 
+// Given cntsd = (rdsvl, #1) >> 3, attempt to return a suitable multiplier
+// for RDSVL to calculate the streaming vector length in bytes * N. i.e.
+//   rdsvl, #(ShlImm - 3)
----------------
MacDue wrote:

Realized I messed up that suggestion, `rdsvl, #(N - 3)` should be `rdsvl, #(1 << (N - 3))`




https://github.com/llvm/llvm-project/pull/154761


More information about the llvm-commits mailing list