[llvm] [AArch64][GlobalISel] Legalize more CTPOP vector types. (PR #131513)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 17 00:13:06 PDT 2025


================
@@ -323,7 +323,13 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
       .clampScalar(0, s32, s128)
       .widenScalarToNextPow2(0)
       .minScalarEltSameAsIf(always, 1, 0)
-      .maxScalarEltSameAsIf(always, 1, 0);
+      .maxScalarEltSameAsIf(always, 1, 0)
+      .clampNumElements(0, v8s8, v16s8)
+      .clampNumElements(0, v4s16, v8s16)
+      .clampNumElements(0, v2s32, v4s32)
+      .clampNumElements(0, v2s64, v2s64)
+      .moreElementsToNextPow2(0)
+      .scalarizeIf(scalarOrEltWiderThan(0, 64), 0);
----------------
arsenm wrote:

Simplify to just scalarize()? 

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


More information about the llvm-commits mailing list