[PATCH] D140392: [SLP][AArch64] Incorrectly estimated intrinsic as a function call

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 06:36:07 PST 2023


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7576
+          SmallVector<Type *, 4> Tys;
+          CallInst *CI = cast<CallInst>(II);
+          for (auto &ArgOp : CI->args())
----------------
dtemirbulatov wrote:
> ABataev wrote:
> > Do you still need this cast to get the list of arguments?
> yes, in order to get correctly prepared ICA. Otherwise sometime we could get incorrect cost or compile time error if we provide empty set of arguments.
II is already an IntrinsicInst, which has CallInst as the base class. I mean, you don't need to do another cast here, you can use II instead of CI


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

https://reviews.llvm.org/D140392



More information about the llvm-commits mailing list