[PATCH] D92094: [CostModel]Replace FixedVectorType by VectorType in costgetIntrinsicInstrCost
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 26 01:40:22 PST 2020
samparker added a comment.
I think it would be a good idea to test that the paths through getCmpSelInstrCost and getArithmeticInstrCost work too.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1280
- if (VF.isVector() && !RetTy->isVoidTy())
- RetTy = FixedVectorType::get(RetTy, VF.getKnownMinValue());
+ // TODO: Handle the remaining intrinsic with scalable vector type
+ if (isa<ScalableVectorType>(RetTy))
----------------
This can be hoisted above the loop, which is makes it a bit more clear that we're not handled scalarization here.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1284
+
+ if (VF.isVector() && !RetTy->isVoidTy()) {
+ RetTy = VectorType::get(RetTy, VF);
----------------
nit: no need for brackets and shouldn't this just be kept as FixedVectorType anyway?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92094/new/
https://reviews.llvm.org/D92094
More information about the llvm-commits
mailing list