[PATCH] D115329: [LoopVectorize] Pass a vector type to isLegalMaskedGather/Scatter
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 9 01:33:18 PST 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Target/X86/X86TargetTransformInfo.cpp:5122-5139
// This function is called now in two cases: from the Loop Vectorizer
- // and from the Scalarizer.
- // When the Loop Vectorizer asks about legality of the feature,
- // the vectorization factor is not calculated yet. The Loop Vectorizer
- // sends a scalar type and the decision is based on the width of the
- // scalar element.
- // Later on, the cost model will estimate usage this intrinsic based on
- // the vector type.
- // The Scalarizer asks again about legality. It sends a vector type.
- // In this case we can reject non-power-of-2 vectors.
- // We also reject single element vectors as the type legalizer can't
+ // and from the Scalarizer to ask about legality of the feature.
+ // In the case of a vector type being sent we can reject non-power-of-2
+ // vectors. We also reject single element vectors as the type legalizer can't
// scalarize it.
if (auto *DataVTy = dyn_cast<FixedVectorType>(DataTy)) {
unsigned NumElts = DataVTy->getNumElements();
----------------
Can you move this code into `forceScalarizeMaskedGather()`?
This should not have been here, LV should rely on cost model.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115329/new/
https://reviews.llvm.org/D115329
More information about the llvm-commits
mailing list