[PATCH] D156439: [TLI][AArch64] Extend ReplaceWithVeclib to replace vector FREM instructions for scalable vectors

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 07:39:42 PDT 2023


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/CodeGen/ReplaceWithVeclib.cpp:137-141
+  if (!TLIName.empty()) {
+    LLVM_DEBUG(dbgs() << DEBUG_TYPE << ": Found unmasked TLI function `"
+                      << TLIName << "`.\n");
+    return replaceWithTLIFunction(I, TLIName);
+  }
----------------
mgabka wrote:
> I am not sure that this is even needed, in the TLI all mappings for SLEEF or ArmPL  for scalable vectors are masked, so I would assume that we either replace with masked call or we do not replace at all, @paulwalker-arm what is your opinion?
Checking for both is fine and akin to what we do in LoopVectorize.  There's no requirement for scalable vector math routines to require a mask, it's just masked versions are easier to work with when tail-folding.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156439



More information about the llvm-commits mailing list