[llvm] [SLP]Initial support for non-power-of-2 (but still whole register) number of elements in operands. (PR #106449)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 13:59:01 PDT 2024
================
@@ -1224,6 +1238,22 @@ static bool doesNotNeedToSchedule(ArrayRef<Value *> VL) {
(all_of(VL, isUsedOutsideBlock) || all_of(VL, areAllOperandsNonInsts));
}
+/// Returns true if widened type of \p Ty elements with size \p Sz represents
+/// full vector type, i.e. adding extra element results in extra parts upon type
+/// legalization.
+static bool hasFullVectorsOnly(const TargetTransformInfo &TTI, Type *Ty,
+ unsigned Sz) {
+ if (Sz <= 1)
+ return false;
+ if (!isValidElementType(Ty) && !isa<FixedVectorType>(Ty))
----------------
alexey-bataev wrote:
No, it is correct, fixed vector type is acceptable (for insertelement instruction and revec)
https://github.com/llvm/llvm-project/pull/106449
More information about the llvm-commits
mailing list