[llvm] 2e13f7a - [SLP][NFC]Add a test with the incorrect vectorization for the pointers with distance difference > 2^32
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon May 12 06:55:14 PDT 2025
Author: Alexey Bataev
Date: 2025-05-12T06:30:05-07:00
New Revision: 2e13f7ab01d05ff2ecc8bbca320da9da047598e9
URL: https://github.com/llvm/llvm-project/commit/2e13f7ab01d05ff2ecc8bbca320da9da047598e9
DIFF: https://github.com/llvm/llvm-project/commit/2e13f7ab01d05ff2ecc8bbca320da9da047598e9.diff
LOG: [SLP][NFC]Add a test with the incorrect vectorization for the pointers with distance difference > 2^32
Added:
llvm/test/Transforms/SLPVectorizer/X86/long-pointer-distance.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/long-pointer-distance.ll b/llvm/test/Transforms/SLPVectorizer/X86/long-pointer-distance.ll
new file mode 100644
index 0000000000000..9cfafd2784488
--- /dev/null
+++ b/llvm/test/Transforms/SLPVectorizer/X86/long-pointer-distance.ll
@@ -0,0 +1,21 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-grtev4-linux-gnu < %s -mattr=+avx | FileCheck %s
+
+define void @test(ptr %this) {
+; CHECK-LABEL: define void @test(
+; CHECK-SAME: ptr [[THIS:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: [[ENTRY:.*:]]
+; CHECK-NEXT: store <4 x i64> <i64 1, i64 2, i64 3, i64 4>, ptr [[THIS]], align 8
+; CHECK-NEXT: ret void
+;
+entry:
+ store i64 1, ptr %this, align 8
+ %b = getelementptr i8, ptr %this, i64 8
+ store i64 2, ptr %b, align 8
+ %c = getelementptr i8, ptr %this, i64 u0x100000010
+ store i64 3, ptr %c, align 8
+ %d = getelementptr i8, ptr %this, i64 u0x100000018
+ store i64 4, ptr %d, align 8
+ ret void
+}
+
More information about the llvm-commits
mailing list