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

Jolanta Jensen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 06:00:15 PDT 2023


jolanta.jensen added inline comments.


================
Comment at: llvm/lib/CodeGen/ReplaceWithVeclib.cpp:50
+  std::string OldName;
+  ElementCount NumElements;
   if (!TLIFunc) {
----------------
jolanta.jensen wrote:
> This is a bug. It will loose its value when it comes to line 104. It needs to be instantiated at once, i.e.
> ElementCount NumElements = (dyn_cast<ScalableVectorType>(I.getType()))->getElementCount();
> 
Or actually, the issue here is we set the ElementCount from an if statement, so if the TLIFunc is present, it will not be set.


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