[PATCH] D149653: [RISCV] Add test for unprofitable SLP vectorization

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 06:45:46 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8288d39b4cce: [RISCV] Add test for unprofitable SLP vectorization (authored by luke).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149653/new/

https://reviews.llvm.org/D149653

Files:
  llvm/test/Transforms/SLPVectorizer/RISCV/struct-gep.ll


Index: llvm/test/Transforms/SLPVectorizer/RISCV/struct-gep.ll
===================================================================
--- /dev/null
+++ 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
+}
+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149653.523752.patch
Type: text/x-patch
Size: 1006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230519/aad9e802/attachment.bin>


More information about the llvm-commits mailing list