[llvm-branch-commits] [llvm] [LV][REVEC][AArch64] Proof of concept for re-vectorisation (PR #208213)
Florian Hahn via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 30 02:09:51 PDT 2026
================
@@ -299,11 +299,31 @@ Value *VPTransformState::get(const VPValue *Def, const VPLane &Lane) {
assert(hasVectorValue(Def));
auto *VecPart = Data.VPV2Vector[Def];
- if (!VecPart->getType()->isVectorTy()) {
+ // If VecPart's type is the same as the initial pre-vectorisation type,
+ // Def hasn't been vectorised. We are done.
+ Type *InitialTy = Def->getScalarType();
+ if (VecPart->getType() == InitialTy) {
assert(Lane.isFirstLane() && "cannot get lane > 0 for scalar");
return VecPart;
}
+
+ // Last case: Extract a lane of type InitialTy from a vectorised value.
// TODO: Cache created scalar values.
+ if (auto *InitVTy = dyn_cast<VectorType>(InitialTy)) {
----------------
fhahn wrote:
Needing those changes here are an indication that the modeling may not be quite right, and woul dbe better to model explicitly
https://github.com/llvm/llvm-project/pull/208213
More information about the llvm-branch-commits
mailing list