[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 05:11:26 PDT 2023
fhahn added inline comments.
================
Comment at: llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
+; RUN: opt -S -passes=slp-vectorizer < %s | FileCheck %s
+
----------------
this is missing an AArch64 triple, you need to add something like `-mtriple=arm64-apple-ios`.
================
Comment at: llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll:4
+
+define void @should_vectorize_gep() {
+; CHECK-LABEL: define void @should_vectorize_gep() {
----------------
Please add a description to the test. The key issue is that it requires a vector GEP + extracts, but the cost is offset by being able to efficiently vectorize the rest of the tree.
================
Comment at: llvm/test/Transforms/SLPVectorizer/AArch64/vector-getelementptr.ll:43
+bb:
+ %getelementptr = getelementptr i32, ptr null, i64 1
+ %load = load i32, ptr null, align 2
----------------
please don't use `null` in the test. e.g. loading from `null` like the test does is UB.
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