[PATCH] D107541: [AArch64] Cost-model vector concatenation
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 07:16:51 PDT 2021
david-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:2105
+ auto SubLT = TLI->getTypeLegalizationCost(DL, SubTp);
+ int NumSubElts = SubLT.second.getVectorNumElements();
+ if (Index + NumSubElts == NumElts && SubLT.second.isVector())
----------------
I think that getVectorNumElements will assert if SubLT.second is not a vector, so the additional isVector() call below is redundant here. If you specifically want to guard against the case where it isn't a vector it's probably better to write this as:
if (SubLT.second.isVector() && (Index + SubLT.second.getVectorNumElements()) == NumElts)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107541/new/
https://reviews.llvm.org/D107541
More information about the llvm-commits
mailing list