[PATCH] D89872: [SVE][AArch64] Fix TypeSize warning in GEP cost analysis
Francesco Petrogalli via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 21 08:40:40 PDT 2020
fpetrogalli added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:813
+ // If this operand is a scalable type, bail out early.
+ // TODO: can we handle scalable vectors in a 'nicer' way here?
+ if (dyn_cast<ScalableVectorType>(TargetType))
----------------
I *think* that it is not a matter of "nicer". I think the comment should just say `TODO: handle scalable vectors.`
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:814
+ // TODO: can we handle scalable vectors in a 'nicer' way here?
+ if (dyn_cast<ScalableVectorType>(TargetType))
+ return TTI::TCC_Basic;
----------------
My bad (sorry): it seems that the LLVM coding standard is asking to replace `dyn_cast` with `isa`. It makes sense, given that the result of the dynamic cast is not used anywhere.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89872/new/
https://reviews.llvm.org/D89872
More information about the llvm-commits
mailing list