Skip to content

Commit 2202f0e

Browse files
committed
[SLP][X86] Add test coverage for #111126
This needs to be expanded to a wider range of tests but for now just focus on #111126
1 parent caf8942 commit 2202f0e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2+
; RUN: opt < %s -S -mtriple=x86_64-- -passes=slp-vectorizer -mcpu=x86-64 | FileCheck %s --check-prefixes=SSE
3+
; RUN: opt < %s -S -mtriple=x86_64-- -passes=slp-vectorizer -mcpu=x86-64-v2 | FileCheck %s --check-prefixes=SSE
4+
; RUN: opt < %s -S -mtriple=x86_64-- -passes=slp-vectorizer -mcpu=x86-64-v3 | FileCheck %s --check-prefixes=AVX
5+
; RUN: opt < %s -S -mtriple=x86_64-- -passes=slp-vectorizer -mcpu=x86-64-v4 | FileCheck %s --check-prefixes=AVX
6+
7+
@arr = global [20 x i64] zeroinitializer, align 16
8+
9+
define void @PR111126() {
10+
; SSE-LABEL: @PR111126(
11+
; SSE-NEXT: store i64 1, ptr @arr, align 16
12+
; SSE-NEXT: store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 8), align 8
13+
; SSE-NEXT: store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 16), align 16
14+
; SSE-NEXT: store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 24), align 8
15+
; SSE-NEXT: store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 32), align 16
16+
; SSE-NEXT: store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 40), align 8
17+
; SSE-NEXT: ret void
18+
;
19+
; AVX-LABEL: @PR111126(
20+
; AVX-NEXT: store <4 x i64> splat (i64 1), ptr @arr, align 16
21+
; AVX-NEXT: store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 32), align 16
22+
; AVX-NEXT: store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 40), align 8
23+
; AVX-NEXT: ret void
24+
;
25+
store i64 1, ptr @arr, align 16
26+
store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 8), align 8
27+
store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 16), align 16
28+
store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 24), align 8
29+
store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 32), align 16
30+
store i64 1, ptr getelementptr inbounds (i8, ptr @arr, i64 40), align 8
31+
ret void
32+
}

0 commit comments

Comments
 (0)