[PATCH] D105696: [AArch64][GlobalISel] Optimise lowering for some vector types for min/max

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 12 17:16:24 PDT 2021


aemerson added inline comments.


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp:172
       .legalFor({v8s8, v16s8, v4s16, v8s16, v2s32, v4s32})
+      .clampNumElements(0, v8s8, v16s8)
+      .clampNumElements(0, v4s16, v8s16)
----------------
dmgreen wrote:
> aemerson wrote:
> > You can use clampMin/MaxNumElts instead to do these.
> It looks like clampNumElements is a wrapper around clampMinNumElements(..).clampMaxNumElements(..);
> 
> Out of interest, what would make the individual methods better to use themselves? Is it something about how small types are widened?
You're right, I had the which-implements-which relation swapped in my head.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105696/new/

https://reviews.llvm.org/D105696



More information about the llvm-commits mailing list