Skip to content

Commit 01371d6

Browse files
[LLVM][AArch64] Reduce uses of "undef" in SVE CodeGen tests.
Using "poison" better reflects realworld generated IR. The main idioms ported are: * Inserting into an undefined vector. * Vector splats. * Masked load/gather operations with an undefined passthrough.
1 parent 6f2345a commit 01371d6

File tree

63 files changed

+1187
-1206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1187
-1206
lines changed

llvm/test/CodeGen/AArch64/aarch64-dup-ext-scalable.ll

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ define <vscale x 2 x i16> @dupsext_v2i8_v2i16(i8 %src, <vscale x 2 x i16> %b) {
1111
; CHECK-NEXT: ret
1212
entry:
1313
%in = sext i8 %src to i16
14-
%broadcast.splatinsert = insertelement <vscale x 2 x i16> undef, i16 %in, i16 0
15-
%broadcast.splat = shufflevector <vscale x 2 x i16> %broadcast.splatinsert, <vscale x 2 x i16> undef, <vscale x 2 x i32> zeroinitializer
14+
%broadcast.splatinsert = insertelement <vscale x 2 x i16> poison, i16 %in, i16 0
15+
%broadcast.splat = shufflevector <vscale x 2 x i16> %broadcast.splatinsert, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
1616
%out = mul nsw <vscale x 2 x i16> %broadcast.splat, %b
1717
ret <vscale x 2 x i16> %out
1818
}
@@ -27,8 +27,8 @@ define <vscale x 4 x i16> @dupsext_v4i8_v4i16(i8 %src, <vscale x 4 x i16> %b) {
2727
; CHECK-NEXT: ret
2828
entry:
2929
%in = sext i8 %src to i16
30-
%broadcast.splatinsert = insertelement <vscale x 4 x i16> undef, i16 %in, i16 0
31-
%broadcast.splat = shufflevector <vscale x 4 x i16> %broadcast.splatinsert, <vscale x 4 x i16> undef, <vscale x 4 x i32> zeroinitializer
30+
%broadcast.splatinsert = insertelement <vscale x 4 x i16> poison, i16 %in, i16 0
31+
%broadcast.splat = shufflevector <vscale x 4 x i16> %broadcast.splatinsert, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
3232
%out = mul nsw <vscale x 4 x i16> %broadcast.splat, %b
3333
ret <vscale x 4 x i16> %out
3434
}
@@ -43,8 +43,8 @@ define <vscale x 8 x i16> @dupsext_v8i8_v8i16(i8 %src, <vscale x 8 x i16> %b) {
4343
; CHECK-NEXT: ret
4444
entry:
4545
%in = sext i8 %src to i16
46-
%broadcast.splatinsert = insertelement <vscale x 8 x i16> undef, i16 %in, i16 0
47-
%broadcast.splat = shufflevector <vscale x 8 x i16> %broadcast.splatinsert, <vscale x 8 x i16> undef, <vscale x 8 x i32> zeroinitializer
46+
%broadcast.splatinsert = insertelement <vscale x 8 x i16> poison, i16 %in, i16 0
47+
%broadcast.splat = shufflevector <vscale x 8 x i16> %broadcast.splatinsert, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
4848
%out = mul nsw <vscale x 8 x i16> %broadcast.splat, %b
4949
ret <vscale x 8 x i16> %out
5050
}
@@ -59,8 +59,8 @@ define <vscale x 2 x i32> @dupsext_v2i8_v2i32(i8 %src, <vscale x 2 x i32> %b) {
5959
; CHECK-NEXT: ret
6060
entry:
6161
%in = sext i8 %src to i32
62-
%broadcast.splatinsert = insertelement <vscale x 2 x i32> undef, i32 %in, i32 0
63-
%broadcast.splat = shufflevector <vscale x 2 x i32> %broadcast.splatinsert, <vscale x 2 x i32> undef, <vscale x 2 x i32> zeroinitializer
62+
%broadcast.splatinsert = insertelement <vscale x 2 x i32> poison, i32 %in, i32 0
63+
%broadcast.splat = shufflevector <vscale x 2 x i32> %broadcast.splatinsert, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
6464
%out = mul nsw <vscale x 2 x i32> %broadcast.splat, %b
6565
ret <vscale x 2 x i32> %out
6666
}
@@ -75,8 +75,8 @@ define <vscale x 4 x i32> @dupsext_v4i8_v4i32(i8 %src, <vscale x 4 x i32> %b) {
7575
; CHECK-NEXT: ret
7676
entry:
7777
%in = sext i8 %src to i32
78-
%broadcast.splatinsert = insertelement <vscale x 4 x i32> undef, i32 %in, i32 0
79-
%broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
78+
%broadcast.splatinsert = insertelement <vscale x 4 x i32> poison, i32 %in, i32 0
79+
%broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
8080
%out = mul nsw <vscale x 4 x i32> %broadcast.splat, %b
8181
ret <vscale x 4 x i32> %out
8282
}
@@ -92,8 +92,8 @@ define <vscale x 2 x i64> @dupsext_v2i8_v2i64(i8 %src, <vscale x 2 x i64> %b) {
9292
; CHECK-NEXT: ret
9393
entry:
9494
%in = sext i8 %src to i64
95-
%broadcast.splatinsert = insertelement <vscale x 2 x i64> undef, i64 %in, i64 0
96-
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer
95+
%broadcast.splatinsert = insertelement <vscale x 2 x i64> poison, i64 %in, i64 0
96+
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
9797
%out = mul nsw <vscale x 2 x i64> %broadcast.splat, %b
9898
ret <vscale x 2 x i64> %out
9999
}
@@ -108,8 +108,8 @@ define <vscale x 2 x i32> @dupsext_v2i16_v2i32(i16 %src, <vscale x 2 x i32> %b)
108108
; CHECK-NEXT: ret
109109
entry:
110110
%in = sext i16 %src to i32
111-
%broadcast.splatinsert = insertelement <vscale x 2 x i32> undef, i32 %in, i32 0
112-
%broadcast.splat = shufflevector <vscale x 2 x i32> %broadcast.splatinsert, <vscale x 2 x i32> undef, <vscale x 2 x i32> zeroinitializer
111+
%broadcast.splatinsert = insertelement <vscale x 2 x i32> poison, i32 %in, i32 0
112+
%broadcast.splat = shufflevector <vscale x 2 x i32> %broadcast.splatinsert, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
113113
%out = mul nsw <vscale x 2 x i32> %broadcast.splat, %b
114114
ret <vscale x 2 x i32> %out
115115
}
@@ -124,8 +124,8 @@ define <vscale x 4 x i32> @dupsext_v4i16_v4i32(i16 %src, <vscale x 4 x i32> %b)
124124
; CHECK-NEXT: ret
125125
entry:
126126
%in = sext i16 %src to i32
127-
%broadcast.splatinsert = insertelement <vscale x 4 x i32> undef, i32 %in, i32 0
128-
%broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
127+
%broadcast.splatinsert = insertelement <vscale x 4 x i32> poison, i32 %in, i32 0
128+
%broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
129129
%out = mul nsw <vscale x 4 x i32> %broadcast.splat, %b
130130
ret <vscale x 4 x i32> %out
131131
}
@@ -141,8 +141,8 @@ define <vscale x 2 x i64> @dupsext_v2i16_v2i64(i16 %src, <vscale x 2 x i64> %b)
141141
; CHECK-NEXT: ret
142142
entry:
143143
%in = sext i16 %src to i64
144-
%broadcast.splatinsert = insertelement <vscale x 2 x i64> undef, i64 %in, i64 0
145-
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer
144+
%broadcast.splatinsert = insertelement <vscale x 2 x i64> poison, i64 %in, i64 0
145+
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
146146
%out = mul nsw <vscale x 2 x i64> %broadcast.splat, %b
147147
ret <vscale x 2 x i64> %out
148148
}
@@ -158,8 +158,8 @@ define <vscale x 2 x i64> @dupsext_v2i32_v2i64(i32 %src, <vscale x 2 x i64> %b)
158158
; CHECK-NEXT: ret
159159
entry:
160160
%in = sext i32 %src to i64
161-
%broadcast.splatinsert = insertelement <vscale x 2 x i64> undef, i64 %in, i64 0
162-
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer
161+
%broadcast.splatinsert = insertelement <vscale x 2 x i64> poison, i64 %in, i64 0
162+
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
163163
%out = mul nsw <vscale x 2 x i64> %broadcast.splat, %b
164164
ret <vscale x 2 x i64> %out
165165
}
@@ -174,8 +174,8 @@ define <vscale x 2 x i16> @dupzext_v2i8_v2i16(i8 %src, <vscale x 2 x i16> %b) {
174174
; CHECK-NEXT: ret
175175
entry:
176176
%in = zext i8 %src to i16
177-
%broadcast.splatinsert = insertelement <vscale x 2 x i16> undef, i16 %in, i16 0
178-
%broadcast.splat = shufflevector <vscale x 2 x i16> %broadcast.splatinsert, <vscale x 2 x i16> undef, <vscale x 2 x i32> zeroinitializer
177+
%broadcast.splatinsert = insertelement <vscale x 2 x i16> poison, i16 %in, i16 0
178+
%broadcast.splat = shufflevector <vscale x 2 x i16> %broadcast.splatinsert, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
179179
%out = mul nuw <vscale x 2 x i16> %broadcast.splat, %b
180180
ret <vscale x 2 x i16> %out
181181
}
@@ -190,8 +190,8 @@ define <vscale x 4 x i16> @dupzext_v4i8_v4i16(i8 %src, <vscale x 4 x i16> %b) {
190190
; CHECK-NEXT: ret
191191
entry:
192192
%in = zext i8 %src to i16
193-
%broadcast.splatinsert = insertelement <vscale x 4 x i16> undef, i16 %in, i16 0
194-
%broadcast.splat = shufflevector <vscale x 4 x i16> %broadcast.splatinsert, <vscale x 4 x i16> undef, <vscale x 4 x i32> zeroinitializer
193+
%broadcast.splatinsert = insertelement <vscale x 4 x i16> poison, i16 %in, i16 0
194+
%broadcast.splat = shufflevector <vscale x 4 x i16> %broadcast.splatinsert, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
195195
%out = mul nuw <vscale x 4 x i16> %broadcast.splat, %b
196196
ret <vscale x 4 x i16> %out
197197
}
@@ -206,8 +206,8 @@ define <vscale x 8 x i16> @dupzext_v8i8_v8i16(i8 %src, <vscale x 8 x i16> %b) {
206206
; CHECK-NEXT: ret
207207
entry:
208208
%in = zext i8 %src to i16
209-
%broadcast.splatinsert = insertelement <vscale x 8 x i16> undef, i16 %in, i16 0
210-
%broadcast.splat = shufflevector <vscale x 8 x i16> %broadcast.splatinsert, <vscale x 8 x i16> undef, <vscale x 8 x i32> zeroinitializer
209+
%broadcast.splatinsert = insertelement <vscale x 8 x i16> poison, i16 %in, i16 0
210+
%broadcast.splat = shufflevector <vscale x 8 x i16> %broadcast.splatinsert, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
211211
%out = mul nuw <vscale x 8 x i16> %broadcast.splat, %b
212212
ret <vscale x 8 x i16> %out
213213
}
@@ -222,8 +222,8 @@ define <vscale x 2 x i32> @dupzext_v2i8_v2i32(i8 %src, <vscale x 2 x i32> %b) {
222222
; CHECK-NEXT: ret
223223
entry:
224224
%in = zext i8 %src to i32
225-
%broadcast.splatinsert = insertelement <vscale x 2 x i32> undef, i32 %in, i32 0
226-
%broadcast.splat = shufflevector <vscale x 2 x i32> %broadcast.splatinsert, <vscale x 2 x i32> undef, <vscale x 2 x i32> zeroinitializer
225+
%broadcast.splatinsert = insertelement <vscale x 2 x i32> poison, i32 %in, i32 0
226+
%broadcast.splat = shufflevector <vscale x 2 x i32> %broadcast.splatinsert, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
227227
%out = mul nuw <vscale x 2 x i32> %broadcast.splat, %b
228228
ret <vscale x 2 x i32> %out
229229
}
@@ -238,8 +238,8 @@ define <vscale x 4 x i32> @dupzext_v4i8_v4i32(i8 %src, <vscale x 4 x i32> %b) {
238238
; CHECK-NEXT: ret
239239
entry:
240240
%in = zext i8 %src to i32
241-
%broadcast.splatinsert = insertelement <vscale x 4 x i32> undef, i32 %in, i32 0
242-
%broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
241+
%broadcast.splatinsert = insertelement <vscale x 4 x i32> poison, i32 %in, i32 0
242+
%broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
243243
%out = mul nuw <vscale x 4 x i32> %broadcast.splat, %b
244244
ret <vscale x 4 x i32> %out
245245
}
@@ -255,8 +255,8 @@ define <vscale x 2 x i64> @dupzext_v2i8_v2i64(i8 %src, <vscale x 2 x i64> %b) {
255255
; CHECK-NEXT: ret
256256
entry:
257257
%in = zext i8 %src to i64
258-
%broadcast.splatinsert = insertelement <vscale x 2 x i64> undef, i64 %in, i64 0
259-
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer
258+
%broadcast.splatinsert = insertelement <vscale x 2 x i64> poison, i64 %in, i64 0
259+
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
260260
%out = mul nuw <vscale x 2 x i64> %broadcast.splat, %b
261261
ret <vscale x 2 x i64> %out
262262
}
@@ -271,8 +271,8 @@ define <vscale x 2 x i32> @dupzext_v2i16_v2i32(i16 %src, <vscale x 2 x i32> %b)
271271
; CHECK-NEXT: ret
272272
entry:
273273
%in = zext i16 %src to i32
274-
%broadcast.splatinsert = insertelement <vscale x 2 x i32> undef, i32 %in, i32 0
275-
%broadcast.splat = shufflevector <vscale x 2 x i32> %broadcast.splatinsert, <vscale x 2 x i32> undef, <vscale x 2 x i32> zeroinitializer
274+
%broadcast.splatinsert = insertelement <vscale x 2 x i32> poison, i32 %in, i32 0
275+
%broadcast.splat = shufflevector <vscale x 2 x i32> %broadcast.splatinsert, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
276276
%out = mul nuw <vscale x 2 x i32> %broadcast.splat, %b
277277
ret <vscale x 2 x i32> %out
278278
}
@@ -287,8 +287,8 @@ define <vscale x 4 x i32> @dupzext_v4i16_v4i32(i16 %src, <vscale x 4 x i32> %b)
287287
; CHECK-NEXT: ret
288288
entry:
289289
%in = zext i16 %src to i32
290-
%broadcast.splatinsert = insertelement <vscale x 4 x i32> undef, i32 %in, i32 0
291-
%broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
290+
%broadcast.splatinsert = insertelement <vscale x 4 x i32> poison, i32 %in, i32 0
291+
%broadcast.splat = shufflevector <vscale x 4 x i32> %broadcast.splatinsert, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
292292
%out = mul nuw <vscale x 4 x i32> %broadcast.splat, %b
293293
ret <vscale x 4 x i32> %out
294294
}
@@ -304,8 +304,8 @@ define <vscale x 2 x i64> @dupzext_v2i16_v2i64(i16 %src, <vscale x 2 x i64> %b)
304304
; CHECK-NEXT: ret
305305
entry:
306306
%in = zext i16 %src to i64
307-
%broadcast.splatinsert = insertelement <vscale x 2 x i64> undef, i64 %in, i64 0
308-
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer
307+
%broadcast.splatinsert = insertelement <vscale x 2 x i64> poison, i64 %in, i64 0
308+
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
309309
%out = mul nuw <vscale x 2 x i64> %broadcast.splat, %b
310310
ret <vscale x 2 x i64> %out
311311
}
@@ -320,8 +320,8 @@ define <vscale x 2 x i64> @dupzext_v2i32_v2i64(i32 %src, <vscale x 2 x i64> %b)
320320
; CHECK-NEXT: ret
321321
entry:
322322
%in = zext i32 %src to i64
323-
%broadcast.splatinsert = insertelement <vscale x 2 x i64> undef, i64 %in, i64 0
324-
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer
323+
%broadcast.splatinsert = insertelement <vscale x 2 x i64> poison, i64 %in, i64 0
324+
%broadcast.splat = shufflevector <vscale x 2 x i64> %broadcast.splatinsert, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
325325
%out = mul nuw <vscale x 2 x i64> %broadcast.splat, %b
326326
ret <vscale x 2 x i64> %out
327327
}

llvm/test/CodeGen/AArch64/aarch64-sve-and-combine-crash.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ define <vscale x 4 x i32> @test(<vscale x 8 x i16> %in1, <vscale x 4 x i32> %in2
1515
; CHECK-NEXT: ret
1616
entry:
1717
%i1 = call <vscale x 4 x i32> @llvm.aarch64.sve.uunpkhi.nxv4i32(<vscale x 8 x i16> %in1)
18-
%i2 = shufflevector <vscale x 4 x i32> %in2, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
18+
%i2 = shufflevector <vscale x 4 x i32> %in2, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
1919
%i3 = and <vscale x 4 x i32> %i1, %i2
2020
ret <vscale x 4 x i32> %i3
2121
}

llvm/test/CodeGen/AArch64/dag-combine-insert-subvector.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ declare <vscale x 2 x double> @llvm.vector.insert.nxv2f64.v8f64(<vscale x 2 x do
1414
define <vscale x 2 x double> @reproducer_one(<vscale x 4 x float> %vec_a) #0 {
1515
%a = call <16 x float> @llvm.vector.extract.v16f32.nxv4f32(<vscale x 4 x float> %vec_a, i64 0)
1616
%b = bitcast <16 x float> %a to <8 x double>
17-
%retval = call <vscale x 2 x double> @llvm.vector.insert.nxv2f64.v8f64(<vscale x 2 x double> undef, <8 x double> %b, i64 0)
17+
%retval = call <vscale x 2 x double> @llvm.vector.insert.nxv2f64.v8f64(<vscale x 2 x double> poison, <8 x double> %b, i64 0)
1818
ret <vscale x 2 x double> %retval
1919
}
2020

2121
define <vscale x 2 x double> @reproducer_two(<4 x double> %a, <4 x double> %b) #0 {
2222
%concat = shufflevector <4 x double> %a, <4 x double> %b, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
23-
%retval = call <vscale x 2 x double> @llvm.vector.insert.nxv2f64.v8f64(<vscale x 2 x double> undef, <8 x double> %concat, i64 0)
23+
%retval = call <vscale x 2 x double> @llvm.vector.insert.nxv2f64.v8f64(<vscale x 2 x double> poison, <8 x double> %concat, i64 0)
2424
ret <vscale x 2 x double> %retval
2525
}

llvm/test/CodeGen/AArch64/sub-splat-sub.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ define <16 x i8> @subsubii8(<16 x i8> %a, i8 %b) {
88
; CHECK-NEXT: ret
99
entry:
1010
%sub = sub i8 0, %b
11-
%0 = insertelement <16 x i8> undef, i8 %sub, i32 0
12-
%sh_prom = shufflevector <16 x i8> %0, <16 x i8> undef, <16 x i32> zeroinitializer
11+
%0 = insertelement <16 x i8> poison, i8 %sub, i32 0
12+
%sh_prom = shufflevector <16 x i8> %0, <16 x i8> poison, <16 x i32> zeroinitializer
1313
%sub2 = sub <16 x i8> zeroinitializer, %sh_prom
1414
ret <16 x i8> %sub2
1515
}
@@ -21,8 +21,8 @@ define <vscale x 16 x i8> @subsubni8(<vscale x 16 x i8> %a, i8 %b) {
2121
; CHECK-NEXT: ret
2222
entry:
2323
%sub = sub i8 0, %b
24-
%0 = insertelement <vscale x 16 x i8> undef, i8 %sub, i32 0
25-
%sh_prom = shufflevector <vscale x 16 x i8> %0, <vscale x 16 x i8> undef, <vscale x 16 x i32> zeroinitializer
24+
%0 = insertelement <vscale x 16 x i8> poison, i8 %sub, i32 0
25+
%sh_prom = shufflevector <vscale x 16 x i8> %0, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
2626
%sub2 = sub <vscale x 16 x i8> zeroinitializer, %sh_prom
2727
ret <vscale x 16 x i8> %sub2
2828
}

llvm/test/CodeGen/AArch64/sve-calling-convention-byref.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@ define aarch64_sve_vector_pcs [4 x <vscale x 16 x i1>] @callee_with_svepred_arg_
266266
%r1 = and <vscale x 16 x i1> %p1, %p5
267267
%r2 = and <vscale x 16 x i1> %p2, %p6
268268
%r3 = and <vscale x 16 x i1> %p3, %p7
269-
%1 = insertvalue [4 x <vscale x 16 x i1>] undef, <vscale x 16 x i1> %r0, 0
270-
%2 = insertvalue [4 x <vscale x 16 x i1>] %1, <vscale x 16 x i1> %r1, 1
271-
%3 = insertvalue [4 x <vscale x 16 x i1>] %2, <vscale x 16 x i1> %r2, 2
272-
%4 = insertvalue [4 x <vscale x 16 x i1>] %3, <vscale x 16 x i1> %r3, 3
269+
%1 = insertvalue [4 x <vscale x 16 x i1>] poison, <vscale x 16 x i1> %r0, 0
270+
%2 = insertvalue [4 x <vscale x 16 x i1>] %1, <vscale x 16 x i1> %r1, 1
271+
%3 = insertvalue [4 x <vscale x 16 x i1>] %2, <vscale x 16 x i1> %r2, 2
272+
%4 = insertvalue [4 x <vscale x 16 x i1>] %3, <vscale x 16 x i1> %r3, 3
273273
ret [4 x <vscale x 16 x i1>] %4
274274
}
275275

llvm/test/CodeGen/AArch64/sve-calling-convention-mixed.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ entry:
4444
%14 = extractvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } %3, 1
4545
%15 = extractvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } %3, 2
4646
%16 = extractvalue { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } %3, 3
47-
%17 = call <vscale x 8 x double> @llvm.vector.insert.nxv8f64.nx2f64(<vscale x 8 x double> undef, <vscale x 2 x double> %13, i64 0)
47+
%17 = call <vscale x 8 x double> @llvm.vector.insert.nxv8f64.nx2f64(<vscale x 8 x double> poison, <vscale x 2 x double> %13, i64 0)
4848
%18 = call <vscale x 8 x double> @llvm.vector.insert.nxv8f64.nx2f64(<vscale x 8 x double> %17, <vscale x 2 x double> %14, i64 2)
4949
%19 = call <vscale x 8 x double> @llvm.vector.insert.nxv8f64.nx2f64(<vscale x 8 x double> %18, <vscale x 2 x double> %15, i64 4)
5050
%20 = call <vscale x 8 x double> @llvm.vector.insert.nxv8f64.nx2f64(<vscale x 8 x double> %19, <vscale x 2 x double> %16, i64 6)

llvm/test/CodeGen/AArch64/sve-extract-element.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,15 +525,15 @@ define i32 @test_undef_lane_4xi32(<vscale x 4 x i32> %a) #0 {
525525
; CHECK: // %bb.0:
526526
; CHECK-NEXT: fmov w0, s0
527527
; CHECK-NEXT: ret
528-
%b = extractelement <vscale x 4 x i32> %a, i32 undef
528+
%b = extractelement <vscale x 4 x i32> %a, i32 poison
529529
ret i32 %b
530530
}
531531

532532
define i8 @extract_of_insert_undef_16xi8(i8 %a) #0 {
533533
; CHECK-LABEL: extract_of_insert_undef_16xi8:
534534
; CHECK: // %bb.0:
535535
; CHECK-NEXT: ret
536-
%b = insertelement <vscale x 16 x i8> undef, i8 %a, i32 0
536+
%b = insertelement <vscale x 16 x i8> poison, i8 %a, i32 0
537537
%c = extractelement <vscale x 16 x i8> %b, i32 0
538538
ret i8 %c
539539
}
@@ -582,8 +582,8 @@ define i64 @test_lanex_splat_2xi64(i64 %x, i32 %y) #0 {
582582
; CHECK-LABEL: test_lanex_splat_2xi64:
583583
; CHECK: // %bb.0:
584584
; CHECK-NEXT: ret
585-
%a = insertelement <vscale x 2 x i64> undef, i64 %x, i32 0
586-
%b = shufflevector <vscale x 2 x i64> %a, <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer
585+
%a = insertelement <vscale x 2 x i64> poison, i64 %x, i32 0
586+
%b = shufflevector <vscale x 2 x i64> %a, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
587587
%c = extractelement <vscale x 2 x i64> %b, i32 %y
588588
ret i64 %c
589589
}

0 commit comments

Comments
 (0)