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

Benjamin Maxwell via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 5 04:49:54 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:

`N` is a the left-shift amount (so a multiply by 2**N), so I think this is better phrased as:

```suggestion
// for RDSVL to calculate `cntsd << N`, i. `rdsvl, #(N - 3)`.
```

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


More information about the cfe-commits mailing list