[llvm] [SLP]Improved reduction cost/codegen (PR #118293)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 08:01:18 PST 2025
================
@@ -2710,6 +2710,23 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
return *LT.first.getValue();
}
+ bool isFullSingleRegisterType(Type *Tp) const {
+ std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(Tp);
+ if (!LT.first.isValid() || LT.first > 1)
+ return false;
+
+ if (auto *FTp = dyn_cast<FixedVectorType>(Tp);
+ Tp && LT.second.isFixedLengthVector()) {
----------------
RKSimon wrote:
Why are you checking for Tp null here?
https://github.com/llvm/llvm-project/pull/118293
More information about the llvm-commits
mailing list