[llvm] [AArch64][GlobalISel] Legalize G_ABS for Larger/Smaller Vectors (PR #79117)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 17:42:43 PST 2024


================
@@ -999,8 +999,11 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
   if (HasCSSC)
     ABSActions
         .legalFor({s32, s64});
-  ABSActions
-      .legalFor(PackedVectorAllTypeList)
+  ABSActions.legalFor(PackedVectorAllTypeList)
+      .clampNumElements(0, v8s8, v16s8)
+      .clampNumElements(0, v4s16, v8s16)
+      .clampNumElements(0, v2s32, v4s32)
+      .clampNumElements(0, v2s64, v2s64)
       .lowerIf(isScalar(0));
----------------
arsenm wrote:

Can simplify the end to just .lower()?

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


More information about the llvm-commits mailing list