Skip to content

[LV][REVEC][AArch64] Proof of concept for re-vectorisation#208213

Draft
gbossu wants to merge 1 commit into
users/gbossu/lv.revec.poc.1from
users/gbossu/lv.revec.poc.2
Draft

[LV][REVEC][AArch64] Proof of concept for re-vectorisation#208213
gbossu wants to merge 1 commit into
users/gbossu/lv.revec.poc.1from
users/gbossu/lv.revec.poc.2

Conversation

@gbossu

@gbossu gbossu commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ DRAFT ⚠️

This shows the changes required to enable basic re-vectorisation support in LoopVectorizer. Most of the diff comes from the added tests, the changes to LoopVectorizer files are rather minimal. This proof-of-concept has obvious limitations and only represents the first building block.

My hope is that this helps discussions and complements the RFC at https://discourse.llvm.org/t/rfc-re-vectorisation-to-wider-vectors-in-loopvectorizer/91071.

Support for re-vectorisation is hidden behind a -vectorize-vector-loops flag and LV will bail out if it encounters constructs that are not yet supported. For example:

  • shufflevectors
  • gather/scatter and interleaved accesses
  • target intrinsics
  • reductions
  • if-conversion or tail folding

Note: This is part of a stacked PR to create a proof-of-concept for re-vectorisation in LoopVectorizer.

This shows the changes required to enable basic re-vectorisation support in LoopVectorizer. Most of the diff comes from the added tests, the changes to LoopVectorizer files are rather minimal. This proof-of-concept has obvious limitations and only represents the first building block.

My hope is that this helps discussions and complements the RFC at https://discourse.llvm.org/t/rfc-re-vectorisation-to-wider-vectors-in-loopvectorizer/91071.

Support for re-vectorisation is hidden behind a -vectorize-vector-loops flag and LV will bail out if it encounters constructs that are not yet supported. For example:
 - shufflevectors
 - gather/scatter and interleaved accesses
 - target intrinsics
 - reductions
 - if-conversion or tail folding
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚠️ LLVM ABI annotation checker, ids-check found issues in your code. ⚠️

You can test this locally with the following command:
Build idt from compnerd/ids, then for each changed header:
    idt -p build/ --main-file <matching-source.cpp> \
        --apply-fixits --inplace <header>
View the diff from ids-check here.
diff --git a/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h b/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
index 25ec10e71..cb1cf4784 100644
--- a/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
+++ b/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
@@ -48,7 +48,7 @@ class TargetLibraryInfo;
 class TargetTransformInfo;
 class Type;
 
-extern cl::opt<bool> VectorizeVectorLoops;
+extern LLVM_ABI cl::opt<bool> VectorizeVectorLoops;
 
 /// Utility class for getting and setting loop vectorizer hints in the form
 /// of loop metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant