[PATCH] D138424: [TargetLowering][AArch64] Teach DemandedBits about SVE count intrinsics

Benjamin Maxwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 04:59:26 PST 2022


benmxwl-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:23303
+    // a value that's strictly less than "ALL".
+    unsigned MaxElements = AArch64::SVEMaxBitsPerVector / *ElementSize;
+    unsigned RequiredBits = Log2_64(MaxElements) + 1;
----------------
dmgreen wrote:
> Is there a reason why this is this based on SVEMaxBitsPerVector and not the maximum value in VScaleRange? Or a combo of both if vscale_range is unbounded for some reason.
No real reason, it just was a little simpler. But it does not add much extra complexity doing the combo check. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138424



More information about the llvm-commits mailing list