[llvm] [AArch64][CostModel] Lower cost of dupq (SVE2.1) (PR #144918)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 24 01:19:22 PDT 2025


================
@@ -6723,6 +6724,29 @@ inline bool isREVMask(ArrayRef<int> M, unsigned EltSize, unsigned NumElts,
   return true;
 }
 
+/// isDUPQMask - matches a splat of equivalent lanes within segments of a given
+///              number of elements.
+inline std::optional<unsigned> isDUPQMask(ArrayRef<int> M, unsigned Segments,
+                                          unsigned NumElts) {
+  unsigned Lane = (unsigned)M[0];
----------------
gbossu wrote:

Super-nit: Maybe prefer the c++ function style cast? I.e. `unsigned(Mask[0])`;

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


More information about the llvm-commits mailing list