[PATCH] D146540: [SLP] Add test to check for GEP vectorization
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 08:35:32 PDT 2023
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
LGTM, thanks. Just a few bits that would be good to address before landing
================
Comment at: llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll:3
+; RUN: opt -mtriple=arm64-apple-ios -S -passes=slp-vectorizer < %s | FileCheck %s
+; vectorization requires a vector GEP + extracts, but the cost is offset by being able to efficiently vectorize the rest of the tree
+
----------------
Move this directly to the test definition, with a newline between comment and run line
================
Comment at: llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll:5
+
+define void @should_vectorize_gep(ptr %base1, ptr %base2, ptr %base_gep) {
+; CHECK-LABEL: define void @should_vectorize_gep
----------------
More consistent to use base3 instead of base_gep? All bases are used with geps
================
Comment at: llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll:65
+ %getelementptr.res.3 = getelementptr i32, ptr %base_gep, i64 %sub3
+ %getelementptr5 = getelementptr i32, ptr %base1, i64 3
+ %getelementptr6 = getelementptr i32, ptr %base2, i64 3
----------------
It would be more compact to use gep instead of get elementary in the names.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146540/new/
https://reviews.llvm.org/D146540
More information about the llvm-commits
mailing list