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/Transforms/InstSimplify] 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/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll
+1-1
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ define <vscale x 4 x i32> @sub_splat() {
45
45
; CHECK-LABEL: @sub_splat(
46
46
; CHECK-NEXT: ret <vscale x 4 x i32> shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> poison, i32 -16, i64 0), <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer)
47
47
;
48
-
%r = sub <vscale x 4 x i32> zeroinitializer, shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i3216, i320), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer)
48
+
%r = sub <vscale x 4 x i32> zeroinitializer, splat (i3216)
Copy file name to clipboardExpand all lines: llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll
+1-1
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ define <vscale x 4 x i32> @sub_splat() {
45
45
; CHECK-LABEL: @sub_splat(
46
46
; CHECK-NEXT: ret <vscale x 4 x i32> shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> poison, i32 -16, i64 0), <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer)
47
47
;
48
-
%r = sub <vscale x 4 x i32> zeroinitializer, shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i3216, i320), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer)
48
+
%r = sub <vscale x 4 x i32> zeroinitializer, splat (i3216)
Copy file name to clipboardExpand all lines: llvm/test/Transforms/InstSimplify/fp-nan.ll
+10-10
Original file line number
Diff line number
Diff line change
@@ -53,15 +53,15 @@ define <vscale x 1 x float> @fsub_nan_op1_scalable_vec_0(<vscale x 1 x float> %x
53
53
; CHECK-LABEL: @fsub_nan_op1_scalable_vec_0(
54
54
; CHECK-NEXT: ret <vscale x 1 x float> shufflevector (<vscale x 1 x float> insertelement (<vscale x 1 x float> poison, float 0x7FF9000000000000, i64 0), <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer)
55
55
;
56
-
%r = fsub <vscale x 1 x float> %x, shufflevector (<vscale x 1 x float> insertelement (<vscale x 1 x float> poison, float0x7FF1000000000000, i640), <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer)
56
+
%r = fsub <vscale x 1 x float> %x, splat (float0x7FF1000000000000)
57
57
ret <vscale x 1 x float> %r
58
58
}
59
59
60
60
define <vscale x 1 x float> @fsub_nan_op1_scalable_vec_1(<vscale x 1 x float> %x) {
61
61
; CHECK-LABEL: @fsub_nan_op1_scalable_vec_1(
62
62
; CHECK-NEXT: ret <vscale x 1 x float> shufflevector (<vscale x 1 x float> insertelement (<vscale x 1 x float> poison, float 0xFFF9000000000000, i64 0), <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer)
63
63
;
64
-
%r = fsub <vscale x 1 x float> %x, shufflevector (<vscale x 1 x float> insertelement (<vscale x 1 x float> poison, float0xFFF1000000000000, i640), <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer)
64
+
%r = fsub <vscale x 1 x float> %x, splat (float0xFFF1000000000000)
65
65
ret <vscale x 1 x float> %r
66
66
}
67
67
@@ -87,15 +87,15 @@ define <vscale x 1 x double> @fmul_nan_op0_scalable_vec_0(<vscale x 1 x double>
87
87
; CHECK-LABEL: @fmul_nan_op0_scalable_vec_0(
88
88
; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF8000000000001, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
89
89
;
90
-
%r = fmul <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double0xFFF0000000000001, i640), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer), %x
90
+
%r = fmul <vscale x 1 x double> splat (double0xFFF0000000000001), %x
91
91
ret <vscale x 1 x double> %r
92
92
}
93
93
94
94
define <vscale x 1 x double> @fmul_nan_op0_scalable_vec_1(<vscale x 1 x double> %x) {
95
95
; CHECK-LABEL: @fmul_nan_op0_scalable_vec_1(
96
96
; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF8DEADDEADDEAD, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
97
97
;
98
-
%r = fmul <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double0xFFF0DEADDEADDEAD, i640), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer), %x
98
+
%r = fmul <vscale x 1 x double> splat (double0xFFF0DEADDEADDEAD), %x
99
99
ret <vscale x 1 x double> %r
100
100
}
101
101
@@ -113,7 +113,7 @@ define <vscale x 1 x double> @fmul_nan_op1_scalable_vec(<vscale x 1 x double> %x
113
113
; CHECK-LABEL: @fmul_nan_op1_scalable_vec(
114
114
; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0x7FF8000000000000, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
115
115
;
116
-
%r = fmul <vscale x 1 x double> %x, shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double0x7FF8000000000000, i640), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
116
+
%r = fmul <vscale x 1 x double> %x, splat (double0x7FF8000000000000)
117
117
ret <vscale x 1 x double> %r
118
118
}
119
119
@@ -131,7 +131,7 @@ define <vscale x 1 x double> @fdivl_nan_op0_scalable_vec(<vscale x 1 x double> %
131
131
; CHECK-LABEL: @fdivl_nan_op0_scalable_vec(
132
132
; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF800000000000F, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
133
133
;
134
-
%r = fdiv <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double0xFFF800000000000F, i640), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer), %x
134
+
%r = fdiv <vscale x 1 x double> splat (double0xFFF800000000000F), %x
135
135
ret <vscale x 1 x double> %r
136
136
}
137
137
@@ -149,7 +149,7 @@ define <vscale x 1 x half> @fdiv_nan_op1_scalable_vec(<vscale x 1 x half> %x) {
149
149
; CHECK-LABEL: @fdiv_nan_op1_scalable_vec(
150
150
; CHECK-NEXT: ret <vscale x 1 x half> shufflevector (<vscale x 1 x half> insertelement (<vscale x 1 x half> poison, half 0xH7FFF, i64 0), <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer)
151
151
;
152
-
%r = fdiv <vscale x 1 x half> %x, shufflevector (<vscale x 1 x half> insertelement (<vscale x 1 x half> poison, half0xH7FFF, i640), <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer)
152
+
%r = fdiv <vscale x 1 x half> %x, splat (half0xH7FFF)
153
153
ret <vscale x 1 x half> %r
154
154
}
155
155
@@ -221,7 +221,7 @@ define <vscale x 1 x double> @fneg_nan_2_scalable_vec() {
221
221
; CHECK-LABEL: @fneg_nan_2_scalable_vec(
222
222
; CHECK-NEXT: ret <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF9234567890ABC, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
223
223
;
224
-
%r = fsub <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double-0.0, i640), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer), shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double0xFFF1234567890ABC, i640), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
224
+
%r = fsub <vscale x 1 x double> splat (double-0.0), splat (double0xFFF1234567890ABC)
225
225
ret <vscale x 1 x double> %r
226
226
}
227
227
@@ -239,7 +239,7 @@ define <vscale x 1 x double> @unary_fneg_nan_2_scalable_vec_0() {
239
239
; CHECK-NEXT: [[R:%.*]] = fneg <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0xFFF1234567890ABC, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
240
240
; CHECK-NEXT: ret <vscale x 1 x double> [[R]]
241
241
;
242
-
%r = fneg <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double0xFFF1234567890ABC, i640), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
242
+
%r = fneg <vscale x 1 x double> splat (double0xFFF1234567890ABC)
243
243
ret <vscale x 1 x double> %r
244
244
}
245
245
@@ -249,7 +249,7 @@ define <vscale x 1 x double> @unary_fneg_nan_2_scalable_vec_1() {
249
249
; CHECK-NEXT: [[R:%.*]] = fneg <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double 0x7FF0000000000001, i64 0), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
250
250
; CHECK-NEXT: ret <vscale x 1 x double> [[R]]
251
251
;
252
-
%r = fneg <vscale x 1 x double> shufflevector (<vscale x 1 x double> insertelement (<vscale x 1 x double> poison, double0x7FF0000000000001, i640), <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer)
252
+
%r = fneg <vscale x 1 x double> splat (double0x7FF0000000000001)
Copy file name to clipboardExpand all lines: llvm/test/Transforms/InstSimplify/shift.ll
+1-1
Original file line number
Diff line number
Diff line change
@@ -347,7 +347,7 @@ define <vscale x 4 x i16> @lshr_scalable_overshift(<vscale x 4 x i16> %va) {
347
347
; CHECK-LABEL: @lshr_scalable_overshift(
348
348
; CHECK-NEXT: ret <vscale x 4 x i16> poison
349
349
;
350
-
%vc = lshr <vscale x 4 x i16> %va, shufflevector (<vscale x 4 x i16> insertelement (<vscale x 4 x i16> poison, i1616, i320), <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer)
Copy file name to clipboardExpand all lines: llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll
+1-1
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,7 @@ define <vscale x 2 x i1> @cmp_le_smax_always_true(<vscale x 2 x i64> %x) {
134
134
; CHECK-LABEL: @cmp_le_smax_always_true(
135
135
; CHECK-NEXT: ret <vscale x 2 x i1> shufflevector (<vscale x 2 x i1> insertelement (<vscale x 2 x i1> poison, i1 true, i64 0), <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer)
136
136
;
137
-
%cmp = icmpsle <vscale x 2 x i64> %x, shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i649223372036854775807, i320), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer)
137
+
%cmp = icmpsle <vscale x 2 x i64> %x, splat (i649223372036854775807)
Copy file name to clipboardExpand all lines: llvm/test/Transforms/InstSimplify/vscale.ll
+1-1
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,7 @@ define <vscale x 2 x i1> @cmp_le_smax_always_true(<vscale x 2 x i64> %x) {
146
146
; CHECK-LABEL: @cmp_le_smax_always_true(
147
147
; CHECK-NEXT: ret <vscale x 2 x i1> shufflevector (<vscale x 2 x i1> insertelement (<vscale x 2 x i1> poison, i1 true, i64 0), <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer)
148
148
;
149
-
%cmp = icmpsle <vscale x 2 x i64> %x, shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i649223372036854775807, i320), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer)
149
+
%cmp = icmpsle <vscale x 2 x i64> %x, splat (i649223372036854775807)
0 commit comments