[PATCH] D158836: [LoopVectorize] Vectorize the compact pattern

Mindong Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 19:48:32 PDT 2023


mdchen added inline comments.


================
Comment at: llvm/lib/Analysis/TargetTransformInfo.cpp:1240
 
+bool TargetTransformInfo::isTargetSupportedCompactStore() const {
+  return TTIImpl->isTargetSupportedCompactStore();
----------------
Overlapped with `isLegalMaskedCompressStore`?


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h:28
 #include <cstdint>
-#include <optional>
 
----------------
Deleted by mistake?


================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:1134
+    return nullptr;
+  case Intrinsic::aarch64_sve_compact:
+    Function *CompactMaskDecl = Intrinsic::getDeclaration(
----------------
This part is aarch64-specific and should be hidden in the mid-end and implemented in the AArch64 backend.


================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:1141
+
+Value *llvm::createTargetCNTP(IRBuilderBase &B, Module *M,
+                              const TargetTransformInfo *TTI, Value *Mask,
----------------
`CNTP` is aarch64 backend mnemonics and lacks generality, something like `createTargetCountVectorActiveElements` would be better. `COMPACT` has the same issue but to me it's more acceptable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158836



More information about the llvm-commits mailing list