File: vec15-base.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (135 lines) | stat: -rw-r--r-- 6,306 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
; RUN: opt -passes=slp-vectorizer -slp-vectorize-non-power-of-2 -mtriple=arm64-apple-ios -S %s | FileCheck --check-prefixes=NON-POW2 %s
; RUN: opt -passes=slp-vectorizer -slp-vectorize-non-power-of-2=false -mtriple=arm64-apple-ios -S %s | FileCheck --check-prefixes=POW2-ONLY %s

define void @v15_load_i8_mul_by_constant_store(ptr %src, ptr noalias %dst) {
; NON-POW2-LABEL: define void @v15_load_i8_mul_by_constant_store(
; NON-POW2-SAME: ptr [[SRC:%.*]], ptr noalias [[DST:%.*]]) {
; NON-POW2-NEXT:  entry:
; NON-POW2-NEXT:    [[GEP_SRC_0:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 0
; NON-POW2-NEXT:    [[TMP0:%.*]] = load <15 x i8>, ptr [[GEP_SRC_0]], align 4
; NON-POW2-NEXT:    [[TMP1:%.*]] = mul nsw <15 x i8> [[TMP0]], <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
; NON-POW2-NEXT:    store <15 x i8> [[TMP1]], ptr [[DST]], align 1
; NON-POW2-NEXT:    ret void
;
; POW2-ONLY-LABEL: define void @v15_load_i8_mul_by_constant_store(
; POW2-ONLY-SAME: ptr [[SRC:%.*]], ptr noalias [[DST:%.*]]) {
; POW2-ONLY-NEXT:  entry:
; POW2-ONLY-NEXT:    [[GEP_SRC_0:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 0
; POW2-ONLY-NEXT:    [[TMP0:%.*]] = load <8 x i8>, ptr [[GEP_SRC_0]], align 4
; POW2-ONLY-NEXT:    [[TMP1:%.*]] = mul nsw <8 x i8> [[TMP0]], <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
; POW2-ONLY-NEXT:    store <8 x i8> [[TMP1]], ptr [[DST]], align 1
; POW2-ONLY-NEXT:    [[GEP_SRC_8:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 8
; POW2-ONLY-NEXT:    [[DST_8:%.*]] = getelementptr i8, ptr [[DST]], i8 8
; POW2-ONLY-NEXT:    [[TMP2:%.*]] = load <4 x i8>, ptr [[GEP_SRC_8]], align 4
; POW2-ONLY-NEXT:    [[TMP3:%.*]] = mul nsw <4 x i8> [[TMP2]], <i8 10, i8 10, i8 10, i8 10>
; POW2-ONLY-NEXT:    store <4 x i8> [[TMP3]], ptr [[DST_8]], align 1
; POW2-ONLY-NEXT:    [[GEP_SRC_12:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 12
; POW2-ONLY-NEXT:    [[L_SRC_12:%.*]] = load i8, ptr [[GEP_SRC_12]], align 4
; POW2-ONLY-NEXT:    [[MUL_12:%.*]] = mul nsw i8 [[L_SRC_12]], 10
; POW2-ONLY-NEXT:    [[DST_12:%.*]] = getelementptr i8, ptr [[DST]], i8 12
; POW2-ONLY-NEXT:    store i8 [[MUL_12]], ptr [[DST_12]], align 1
; POW2-ONLY-NEXT:    [[GEP_SRC_13:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 13
; POW2-ONLY-NEXT:    [[L_SRC_13:%.*]] = load i8, ptr [[GEP_SRC_13]], align 4
; POW2-ONLY-NEXT:    [[MUL_13:%.*]] = mul nsw i8 [[L_SRC_13]], 10
; POW2-ONLY-NEXT:    [[DST_13:%.*]] = getelementptr i8, ptr [[DST]], i8 13
; POW2-ONLY-NEXT:    store i8 [[MUL_13]], ptr [[DST_13]], align 1
; POW2-ONLY-NEXT:    [[GEP_SRC_14:%.*]] = getelementptr inbounds i8, ptr [[SRC]], i8 14
; POW2-ONLY-NEXT:    [[L_SRC_14:%.*]] = load i8, ptr [[GEP_SRC_14]], align 4
; POW2-ONLY-NEXT:    [[MUL_14:%.*]] = mul nsw i8 [[L_SRC_14]], 10
; POW2-ONLY-NEXT:    [[DST_14:%.*]] = getelementptr i8, ptr [[DST]], i8 14
; POW2-ONLY-NEXT:    store i8 [[MUL_14]], ptr [[DST_14]], align 1
; POW2-ONLY-NEXT:    ret void
;
entry:
  %gep.src.0 = getelementptr inbounds i8, ptr %src, i8 0
  %l.src.0 = load i8, ptr %gep.src.0, align 4
  %mul.0 = mul nsw i8 %l.src.0, 10
  store i8 %mul.0, ptr %dst

  %gep.src.1 = getelementptr inbounds i8, ptr %src, i8 1
  %l.src.1 = load i8, ptr %gep.src.1, align 4
  %mul.1 = mul nsw i8 %l.src.1, 10
  %dst.1 = getelementptr i8, ptr %dst, i8 1
  store i8 %mul.1, ptr %dst.1

  %gep.src.2 = getelementptr inbounds i8, ptr %src, i8 2
  %l.src.2 = load i8, ptr %gep.src.2, align 4
  %mul.2 = mul nsw i8 %l.src.2, 10
  %dst.2 = getelementptr i8, ptr %dst, i8 2
  store i8 %mul.2, ptr %dst.2

  %gep.src.3 = getelementptr inbounds i8, ptr %src, i8 3
  %l.src.3 = load i8, ptr %gep.src.3, align 4
  %mul.3 = mul nsw i8 %l.src.3, 10
  %dst.3 = getelementptr i8, ptr %dst, i8 3
  store i8 %mul.3, ptr %dst.3

  %gep.src.4 = getelementptr inbounds i8, ptr %src, i8 4
  %l.src.4 = load i8, ptr %gep.src.4, align 4
  %mul.4 = mul nsw i8 %l.src.4, 10
  %dst.4 = getelementptr i8, ptr %dst, i8 4
  store i8 %mul.4, ptr %dst.4

  %gep.src.5 = getelementptr inbounds i8, ptr %src, i8 5
  %l.src.5 = load i8, ptr %gep.src.5, align 4
  %mul.5 = mul nsw i8 %l.src.5, 10
  %dst.5 = getelementptr i8, ptr %dst, i8 5
  store i8 %mul.5, ptr %dst.5

  %gep.src.6 = getelementptr inbounds i8, ptr %src, i8 6
  %l.src.6 = load i8, ptr %gep.src.6, align 4
  %mul.6 = mul nsw i8 %l.src.6, 10
  %dst.6 = getelementptr i8, ptr %dst, i8 6
  store i8 %mul.6, ptr %dst.6

  %gep.src.7 = getelementptr inbounds i8, ptr %src, i8 7
  %l.src.7 = load i8, ptr %gep.src.7, align 4
  %mul.7 = mul nsw i8 %l.src.7, 10
  %dst.7 = getelementptr i8, ptr %dst, i8 7
  store i8 %mul.7, ptr %dst.7

  %gep.src.8 = getelementptr inbounds i8, ptr %src, i8 8
  %l.src.8 = load i8, ptr %gep.src.8, align 4
  %mul.8 = mul nsw i8 %l.src.8, 10
  %dst.8 = getelementptr i8, ptr %dst, i8 8
  store i8 %mul.8, ptr %dst.8

  %gep.src.9 = getelementptr inbounds i8, ptr %src, i8 9
  %l.src.9 = load i8, ptr %gep.src.9, align 4
  %mul.9 = mul nsw i8 %l.src.9, 10
  %dst.9 = getelementptr i8, ptr %dst, i8 9
  store i8 %mul.9, ptr %dst.9

  %gep.src.10 = getelementptr inbounds i8, ptr %src, i8 10
  %l.src.10 = load i8, ptr %gep.src.10, align 4
  %mul.10 = mul nsw i8 %l.src.10, 10
  %dst.10 = getelementptr i8, ptr %dst, i8 10
  store i8 %mul.10, ptr %dst.10

  %gep.src.11 = getelementptr inbounds i8, ptr %src, i8 11
  %l.src.11 = load i8, ptr %gep.src.11, align 4
  %mul.11 = mul nsw i8 %l.src.11, 10
  %dst.11 = getelementptr i8, ptr %dst, i8 11
  store i8 %mul.11, ptr %dst.11

  %gep.src.12 = getelementptr inbounds i8, ptr %src, i8 12
  %l.src.12 = load i8, ptr %gep.src.12, align 4
  %mul.12 = mul nsw i8 %l.src.12, 10
  %dst.12 = getelementptr i8, ptr %dst, i8 12
  store i8 %mul.12, ptr %dst.12

  %gep.src.13 = getelementptr inbounds i8, ptr %src, i8 13
  %l.src.13 = load i8, ptr %gep.src.13, align 4
  %mul.13 = mul nsw i8 %l.src.13, 10
  %dst.13 = getelementptr i8, ptr %dst, i8 13
  store i8 %mul.13, ptr %dst.13

  %gep.src.14 = getelementptr inbounds i8, ptr %src, i8 14
  %l.src.14 = load i8, ptr %gep.src.14, align 4
  %mul.14 = mul nsw i8 %l.src.14, 10
  %dst.14 = getelementptr i8, ptr %dst, i8 14
  store i8 %mul.14, ptr %dst.14

  ret void
}