[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 07:53:38 PDT 2020
fpetrogalli added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:801-807
+ // If this operand is a scalable type, bail out early.
+ // TODO: can we handle scalable vectors in a 'nicer' way here?
+ if (const VectorType *VTy = dyn_cast<VectorType>(TargetType)) {
+ if (VTy->getElementCount().isScalable())
+ return TTI::TCC_Basic;
+ }
+
----------------
I think you can do this:
```
if (dyn_cast<ScalableVectorType>(TargetType))
return TTI::TCC_Basic;
```
You should also move this code inside the `else` branch below, right before computing `ElementSize`, because this would be one of the types that are not "StructType".
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