You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LLVM][tests/CodeGen/AArch64] Convert instances of ConstantExpr based splats to use splat().
This is mostly NFC but some output does change due to consistently
inserting into poison rather than undef and using i64 as the index
type for inserts.
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/AArch64/complex-deinterleaving-splat-scalable.ll
+4-4
Original file line number
Diff line number
Diff line change
@@ -40,11 +40,11 @@ entry:
40
40
%7 = fmul fast <vscale x 2 x double> %2, %0
41
41
%8 = fmul fast <vscale x 2 x double> %3, %1
42
42
%9 = fsub fast <vscale x 2 x double> %7, %8
43
-
%10 = fmul fast <vscale x 2 x double> %9, shufflevector (<vscale x 2 x double> insertelement (<vscale x 2 x double> poison, double3.000000e+00, i640), <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer)
44
-
%11 = fmul fast <vscale x 2 x double> %6, shufflevector (<vscale x 2 x double> insertelement (<vscale x 2 x double> poison, double1.100000e+01, i640), <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer)
43
+
%10 = fmul fast <vscale x 2 x double> %9, splat (double3.000000e+00)
44
+
%11 = fmul fast <vscale x 2 x double> %6, splat (double1.100000e+01)
45
45
%12 = fadd fast <vscale x 2 x double> %10, %11
46
-
%13 = fmul fast <vscale x 2 x double> %9, shufflevector (<vscale x 2 x double> insertelement (<vscale x 2 x double> poison, double1.100000e+01, i640), <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer)
47
-
%14 = fmul fast <vscale x 2 x double> %6, shufflevector (<vscale x 2 x double> insertelement (<vscale x 2 x double> poison, double3.000000e+00, i640), <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer)
46
+
%13 = fmul fast <vscale x 2 x double> %9, splat (double1.100000e+01)
47
+
%14 = fmul fast <vscale x 2 x double> %6, splat (double3.000000e+00)
48
48
%15 = fsub fast <vscale x 2 x double> %13, %14
49
49
%interleaved.vec = tailcall <vscale x 4 x double> @llvm.experimental.vector.interleave2.nxv4f64(<vscale x 2 x double> %15, <vscale x 2 x double> %12)
callvoid@llvm.masked.scatter.nxv16i8.nxv16p0(<vscale x 16 x i8> zeroinitializer, <vscale x 16 x ptr> zeroinitializer, i320, <vscale x 16 x i1> xor (<vscale x 16 x i1> shufflevector (<vscale x 16 x i1> icmpeq (<vscale x 16 x ptr> insertelement (<vscale x 16 x ptr> poison, ptrnull, i640), <vscale x 16 x ptr> zeroinitializer), <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer), <vscale x 16 x i1> shufflevector (<vscale x 16 x i1> insertelement (<vscale x 16 x i1> poison, i1true, i320), <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer)))
66
+
callvoid@llvm.masked.scatter.nxv16i8.nxv16p0(<vscale x 16 x i8> zeroinitializer, <vscale x 16 x ptr> zeroinitializer, i320, <vscale x 16 x i1> xor (<vscale x 16 x i1> shufflevector (<vscale x 16 x i1> icmpeq (<vscale x 16 x ptr> insertelement (<vscale x 16 x ptr> poison, ptrnull, i640), <vscale x 16 x ptr> zeroinitializer), <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer), <vscale x 16 x i1> splat (i1true)))
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/AArch64/fold-int-pow2-with-fmul-or-fdiv.ll
+3-3
Original file line number
Diff line number
Diff line change
@@ -611,9 +611,9 @@ define <vscale x 4 x float> @fdiv_pow2_nx4xfloat(<vscale x 4 x i32> %i) "target-
611
611
; CHECK-NEXT: ucvtf z0.s, p0/m, z0.s
612
612
; CHECK-NEXT: fdivr z0.s, p0/m, z0.s, z1.s
613
613
; CHECK-NEXT: ret
614
-
%p2 = shl <vscale x 4 x i32> shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> poison, i321, i640), <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer), %i
614
+
%p2 = shl <vscale x 4 x i32> splat (i321), %i
615
615
%p2_f = uitofp <vscale x 4 x i32> %p2to <vscale x 4 x float>
616
-
%r = fdiv <vscale x 4 x float> shufflevector (<vscale x 4 x float> insertelement (<vscale x 4 x float> poison, float9.000000e+00, i640), <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer), %p2_f
616
+
%r = fdiv <vscale x 4 x float> splat (float9.000000e+00), %p2_f
617
617
ret <vscale x 4 x float> %r
618
618
}
619
619
@@ -626,6 +626,6 @@ define <vscale x 2 x double> @scalable2(<vscale x 2 x i64> %0) "target-features"
626
626
; CHECK-NEXT: fdivr z0.d, p0/m, z0.d, z1.d
627
627
; CHECK-NEXT: ret
628
628
%2 = uitofp <vscale x 2 x i64> %0to <vscale x 2 x double>
629
-
%3 = fdiv <vscale x 2 x double> shufflevector (<vscale x 2 x double> insertelement (<vscale x 2 x double> poison, double1.000000e+00, i640), <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer), %2
629
+
%3 = fdiv <vscale x 2 x double> splat (double1.000000e+00), %2
callvoid@func_f8_and_v0_passed_via_memory(float0.0, float1.0, float2.0, float3.0, float4.0, float5.0, float6.0, float7.0, float8.0, <vscale x 4 x float> shufflevector (<vscale x 4 x float> insertelement (<vscale x 4 x float> poison, float9.000000e+00, i640), <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer))
727
+
callvoid@func_f8_and_v0_passed_via_memory(float0.0, float1.0, float2.0, float3.0, float4.0, float5.0, float6.0, float7.0, float8.0, <vscale x 4 x float> splat (float9.000000e+00))
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/AArch64/sve-expand-div.ll
+8-8
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ define <vscale x 16 x i8> @sdiv_i8(<vscale x 16 x i8> %a) #0 {
16
16
; CHECK-NEXT: lsr z1.b, z0.b, #7
17
17
; CHECK-NEXT: add z0.b, z0.b, z1.b
18
18
; CHECK-NEXT: ret
19
-
%div = sdiv <vscale x 16 x i8> %a, shufflevector (<vscale x 16 x i8> insertelement (<vscale x 16 x i8> undef, i83, i320), <vscale x 16 x i8> undef, <vscale x 16 x i32> zeroinitializer)
19
+
%div = sdiv <vscale x 16 x i8> %a, splat (i83)
20
20
ret <vscale x 16 x i8> %div
21
21
}
22
22
@@ -30,7 +30,7 @@ define <vscale x 8 x i16> @sdiv_i16(<vscale x 8 x i16> %a) #0 {
30
30
; CHECK-NEXT: lsr z1.h, z0.h, #15
31
31
; CHECK-NEXT: add z0.h, z0.h, z1.h
32
32
; CHECK-NEXT: ret
33
-
%div = sdiv <vscale x 8 x i16> %a, shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> undef, i163, i320), <vscale x 8 x i16> undef, <vscale x 8 x i32> zeroinitializer)
33
+
%div = sdiv <vscale x 8 x i16> %a, splat (i163)
34
34
ret <vscale x 8 x i16> %div
35
35
}
36
36
@@ -45,7 +45,7 @@ define <vscale x 4 x i32> @sdiv_i32(<vscale x 4 x i32> %a) #0 {
45
45
; CHECK-NEXT: lsr z1.s, z0.s, #31
46
46
; CHECK-NEXT: add z0.s, z0.s, z1.s
47
47
; CHECK-NEXT: ret
48
-
%div = sdiv <vscale x 4 x i32> %a, shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i323, i320), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer)
48
+
%div = sdiv <vscale x 4 x i32> %a, splat (i323)
49
49
ret <vscale x 4 x i32> %div
50
50
}
51
51
@@ -60,7 +60,7 @@ define <vscale x 2 x i64> @sdiv_i64(<vscale x 2 x i64> %a) #0 {
60
60
; CHECK-NEXT: lsr z1.d, z0.d, #63
61
61
; CHECK-NEXT: add z0.d, z0.d, z1.d
62
62
; CHECK-NEXT: ret
63
-
%div = sdiv <vscale x 2 x i64> %a, shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> undef, i643, i320), <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer)
63
+
%div = sdiv <vscale x 2 x i64> %a, splat (i643)
64
64
ret <vscale x 2 x i64> %div
65
65
}
66
66
@@ -76,7 +76,7 @@ define <vscale x 16 x i8> @udiv_i8(<vscale x 16 x i8> %a) #0 {
76
76
; CHECK-NEXT: umulh z0.b, p0/m, z0.b, z1.b
77
77
; CHECK-NEXT: lsr z0.b, z0.b, #1
78
78
; CHECK-NEXT: ret
79
-
%div = udiv <vscale x 16 x i8> %a, shufflevector (<vscale x 16 x i8> insertelement (<vscale x 16 x i8> undef, i83, i320), <vscale x 16 x i8> undef, <vscale x 16 x i32> zeroinitializer)
79
+
%div = udiv <vscale x 16 x i8> %a, splat (i83)
80
80
ret <vscale x 16 x i8> %div
81
81
}
82
82
@@ -89,7 +89,7 @@ define <vscale x 8 x i16> @udiv_i16(<vscale x 8 x i16> %a) #0 {
89
89
; CHECK-NEXT: umulh z0.h, p0/m, z0.h, z1.h
90
90
; CHECK-NEXT: lsr z0.h, z0.h, #1
91
91
; CHECK-NEXT: ret
92
-
%div = udiv <vscale x 8 x i16> %a, shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> undef, i163, i320), <vscale x 8 x i16> undef, <vscale x 8 x i32> zeroinitializer)
92
+
%div = udiv <vscale x 8 x i16> %a, splat (i163)
93
93
ret <vscale x 8 x i16> %div
94
94
}
95
95
@@ -103,7 +103,7 @@ define <vscale x 4 x i32> @udiv_i32(<vscale x 4 x i32> %a) #0 {
103
103
; CHECK-NEXT: umulh z0.s, p0/m, z0.s, z1.s
104
104
; CHECK-NEXT: lsr z0.s, z0.s, #1
105
105
; CHECK-NEXT: ret
106
-
%div = udiv <vscale x 4 x i32> %a, shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i323, i320), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer)
106
+
%div = udiv <vscale x 4 x i32> %a, splat (i323)
107
107
ret <vscale x 4 x i32> %div
108
108
}
109
109
@@ -117,7 +117,7 @@ define <vscale x 2 x i64> @udiv_i64(<vscale x 2 x i64> %a) #0 {
117
117
; CHECK-NEXT: umulh z0.d, p0/m, z0.d, z1.d
118
118
; CHECK-NEXT: lsr z0.d, z0.d, #1
119
119
; CHECK-NEXT: ret
120
-
%div = udiv <vscale x 2 x i64> %a, shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> undef, i643, i320), <vscale x 2 x i64> undef, <vscale x 2 x i32> zeroinitializer)
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/AArch64/sve-fp-int-min-max.ll
+3-3
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,11 @@ define i64 @scalable_int_min_max(ptr %arg, ptr %arg1, <vscale x 2 x ptr> %i37, <
33
33
entry:
34
34
%i56 = getelementptrinboundsfloat, ptr%arg, i640
35
35
%i57 = load <vscale x 2 x float>, ptr%i56, align4
36
-
%i58 = fmul <vscale x 2 x float> %i57, shufflevector (<vscale x 2 x float> insertelement (<vscale x 2 x float> poison, float0x401D41D420000000, i640), <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer)
37
-
%i59 = fadd <vscale x 2 x float> %i58, shufflevector (<vscale x 2 x float> insertelement (<vscale x 2 x float> poison, float1.023500e+03, i640), <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer)
36
+
%i58 = fmul <vscale x 2 x float> %i57, splat (float0x401D41D420000000)
37
+
%i59 = fadd <vscale x 2 x float> %i58, splat (float1.023500e+03)
38
38
%i60 = fptosi <vscale x 2 x float> %i59to <vscale x 2 x i32>
39
39
%i61 = tailcall <vscale x 2 x i32> @llvm.smax.nxv2i32(<vscale x 2 x i32> %i60, <vscale x 2 x i32> zeroinitializer)
40
-
%i62 = tailcall <vscale x 2 x i32> @llvm.smin.nxv2i32(<vscale x 2 x i32> %i61, <vscale x 2 x i32> shufflevector (<vscale x 2 x i32> insertelement (<vscale x 2 x i32> poison, i321023, i640), <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer))
40
+
%i62 = tailcall <vscale x 2 x i32> @llvm.smin.nxv2i32(<vscale x 2 x i32> %i61, <vscale x 2 x i32> splat (i321023))
41
41
%i63 = icmpne <vscale x 2 x i32> %i62, zeroinitializer
42
42
%i64 = getelementptrfloat, ptr%arg1, i640
43
43
%i65 = tailcall <vscale x 2 x float> @llvm.masked.load.nxv2f32.p0(ptr%i64, i324, <vscale x 2 x i1> %i63, <vscale x 2 x float> poison)
Copy file name to clipboardExpand all lines: llvm/test/CodeGen/AArch64/sve-gather-scatter-dag-combine.ll
+6-6
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ define <vscale x 16 x i8> @narrow_i64_gather_index_i8_zext(ptr %out, ptr %in, <v
95
95
%wide.load = load <vscale x 16 x i8>, ptr%2, align1
96
96
%3 = zext <vscale x 16 x i8> %wide.loadto <vscale x 16 x i64>
97
97
%4 = getelementptrinboundsi8, ptr%in, <vscale x 16 x i64> %3
98
-
%wide.masked.gather = call <vscale x 16 x i8> @llvm.masked.gather.nxv16i8.nxv16p0(<vscale x 16 x ptr> %4, i321, <vscale x 16 x i1> shufflevector (<vscale x 16 x i1> insertelement (<vscale x 16 x i1> poison, i1true, i320), <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer), <vscale x 16 x i8> undef)
98
+
%wide.masked.gather = call <vscale x 16 x i8> @llvm.masked.gather.nxv16i8.nxv16p0(<vscale x 16 x ptr> %4, i321, <vscale x 16 x i1> splat (i1true), <vscale x 16 x i8> undef)
99
99
ret <vscale x 16 x i8> %wide.masked.gather
100
100
}
101
101
@@ -121,7 +121,7 @@ define <vscale x 16 x i8> @narrow_i64_gather_index_i8_sext(ptr %out, ptr %in, <v
121
121
%wide.load = load <vscale x 16 x i8>, ptr%2, align1
122
122
%3 = sext <vscale x 16 x i8> %wide.loadto <vscale x 16 x i64>
123
123
%4 = getelementptrinboundsi8, ptr%in, <vscale x 16 x i64> %3
124
-
%wide.masked.gather = call <vscale x 16 x i8> @llvm.masked.gather.nxv16i8.nxv16p0(<vscale x 16 x ptr> %4, i321, <vscale x 16 x i1> shufflevector (<vscale x 16 x i1> insertelement (<vscale x 16 x i1> poison, i1true, i320), <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer), <vscale x 16 x i8> undef)
124
+
%wide.masked.gather = call <vscale x 16 x i8> @llvm.masked.gather.nxv16i8.nxv16p0(<vscale x 16 x ptr> %4, i321, <vscale x 16 x i1> splat (i1true), <vscale x 16 x i8> undef)
125
125
ret <vscale x 16 x i8> %wide.masked.gather
126
126
}
127
127
@@ -141,7 +141,7 @@ define <vscale x 8 x i16> @narrow_i64_gather_index_i16_zext(ptr %out, ptr %in, <
141
141
%wide.load = load <vscale x 8 x i16>, ptr%2, align1
142
142
%3 = zext <vscale x 8 x i16> %wide.loadto <vscale x 8 x i64>
143
143
%4 = getelementptrinboundsi16, ptr%in, <vscale x 8 x i64> %3
144
-
%wide.masked.gather = call <vscale x 8 x i16> @llvm.masked.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %4, i321, <vscale x 8 x i1> shufflevector (<vscale x 8 x i1> insertelement (<vscale x 8 x i1> poison, i1true, i320), <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer), <vscale x 8 x i16> undef)
144
+
%wide.masked.gather = call <vscale x 8 x i16> @llvm.masked.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %4, i321, <vscale x 8 x i1> splat (i1true), <vscale x 8 x i16> undef)
145
145
ret <vscale x 8 x i16> %wide.masked.gather
146
146
}
147
147
@@ -161,7 +161,7 @@ define <vscale x 8 x i16> @narrow_i64_gather_index_i16_sext(ptr %out, ptr %in, <
161
161
%wide.load = load <vscale x 8 x i16>, ptr%2, align1
162
162
%3 = sext <vscale x 8 x i16> %wide.loadto <vscale x 8 x i64>
163
163
%4 = getelementptrinboundsi16, ptr%in, <vscale x 8 x i64> %3
164
-
%wide.masked.gather = call <vscale x 8 x i16> @llvm.masked.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %4, i321, <vscale x 8 x i1> shufflevector (<vscale x 8 x i1> insertelement (<vscale x 8 x i1> poison, i1true, i320), <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer), <vscale x 8 x i16> undef)
164
+
%wide.masked.gather = call <vscale x 8 x i16> @llvm.masked.gather.nxv8i16.nxv8p0(<vscale x 8 x ptr> %4, i321, <vscale x 8 x i1> splat (i1true), <vscale x 8 x i16> undef)
165
165
ret <vscale x 8 x i16> %wide.masked.gather
166
166
}
167
167
@@ -177,7 +177,7 @@ define <vscale x 4 x i32> @no_narrow_i64_gather_index_i32(ptr %out, ptr %in, <vs
177
177
%wide.load = load <vscale x 4 x i32>, ptr%2, align1
178
178
%3 = zext <vscale x 4 x i32> %wide.loadto <vscale x 4 x i64>
179
179
%4 = getelementptrinboundsi32, ptr%in, <vscale x 4 x i64> %3
180
-
%wide.masked.gather = call <vscale x 4 x i32> @llvm.masked.gather.nxv4i32.nxv4p0(<vscale x 4 x ptr> %4, i321, <vscale x 4 x i1> shufflevector (<vscale x 4 x i1> insertelement (<vscale x 4 x i1> poison, i1true, i320), <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer), <vscale x 4 x i32> undef)
180
+
%wide.masked.gather = call <vscale x 4 x i32> @llvm.masked.gather.nxv4i32.nxv4p0(<vscale x 4 x ptr> %4, i321, <vscale x 4 x i1> splat (i1true), <vscale x 4 x i32> undef)
181
181
ret <vscale x 4 x i32> %wide.masked.gather
182
182
}
183
183
@@ -192,7 +192,7 @@ define <vscale x 2 x i64> @no_narrow_i64_gather_index_i64(ptr %out, ptr %in, <vs
192
192
%2 = bitcastptr%1toptr
193
193
%wide.load = load <vscale x 2 x i64>, ptr%2, align1
194
194
%3 = getelementptrinboundsi64, ptr%in, <vscale x 2 x i64> %wide.load
195
-
%wide.masked.gather = call <vscale x 2 x i64> @llvm.masked.gather.nxv2i64.nxv2p0(<vscale x 2 x ptr> %3, i321, <vscale x 2 x i1> shufflevector (<vscale x 2 x i1> insertelement (<vscale x 2 x i1> poison, i1true, i320), <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer), <vscale x 2 x i64> undef)
195
+
%wide.masked.gather = call <vscale x 2 x i64> @llvm.masked.gather.nxv2i64.nxv2p0(<vscale x 2 x ptr> %3, i321, <vscale x 2 x i1> splat (i1true), <vscale x 2 x i64> undef)
0 commit comments