[llvm] 8288d39 - [RISCV] Add test for unprofitable SLP vectorization
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 06:45:44 PDT 2023
Author: Luke Lau
Date: 2023-05-19T14:45:39+01:00
New Revision: 8288d39b4cce67a3947204aa955df082ad0e76fc
URL: https://github.com/llvm/llvm-project/commit/8288d39b4cce67a3947204aa955df082ad0e76fc
DIFF: https://github.com/llvm/llvm-project/commit/8288d39b4cce67a3947204aa955df082ad0e76fc.diff
LOG: [RISCV] Add test for unprofitable SLP vectorization
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D149653
Added:
llvm/test/Transforms/SLPVectorizer/RISCV/struct-gep.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SLPVectorizer/RISCV/struct-gep.ll b/llvm/test/Transforms/SLPVectorizer/RISCV/struct-gep.ll
new file mode 100644
index 0000000000000..1f6a28ea48044
--- /dev/null
+++ b/llvm/test/Transforms/SLPVectorizer/RISCV/struct-gep.ll
@@ -0,0 +1,23 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes=slp-vectorizer -mtriple=riscv64 -mattr=+v \
+; RUN: -riscv-v-slp-max-vf=0 -S | FileCheck %s
+
+; FIXME: This should not be vectorized
+
+%struct.2i32 = type { i32, i32 }
+
+define void @splat_store_v2i32(ptr %dest, i64 %i) {
+; CHECK-LABEL: @splat_store_v2i32(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[P1:%.*]] = getelementptr [[STRUCT_2I32:%.*]], ptr [[DEST:%.*]], i64 [[I:%.*]], i32 0
+; CHECK-NEXT: store <2 x i32> <i32 1, i32 1>, ptr [[P1]], align 4
+; CHECK-NEXT: ret void
+;
+entry:
+ %p1 = getelementptr %struct.2i32, ptr %dest, i64 %i, i32 0
+ store i32 1, ptr %p1
+ %p2 = getelementptr %struct.2i32, ptr %dest, i64 %i, i32 1
+ store i32 1, ptr %p2
+ ret void
+}
+
More information about the llvm-commits
mailing list