[PATCH] D103407: [TTI] NFC: Change getNumberOfParts to return InstructionCost.
Daniil Fukalov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 2 06:35:55 PDT 2021
dfukalov added a comment.
Yes, using InstructionCost as number of parts may be confusing, but
1. The function is also used in line 7245 of LoopVectorize.cpp <https://reviews.llvm.org/source/llvm-github/browse/main/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp$7245> so "Transforms/LoopVectorize/AArch64/scalable-vf-hint.ll" test starts to assert in `@test_no_sve` just after `getTypeLegalizationCost()` returns invalid cost.
2. The same logic was used for `getRegUsageForType()` in D102541 <https://reviews.llvm.org/D102541> for number of registers so I decided to repeat it here.
It seemed to me that zero result of `getRegUsageForType()` may be correct for some target, but I'm not sure we need it.
Possible it should be better to convert 'invalid' case to 'zero' result here.
If so, I guess should we change `getRegUsageForType()` to the same logic and return there `unsigned` too (zero for invalid cost)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103407/new/
https://reviews.llvm.org/D103407
More information about the llvm-commits
mailing list