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
[IRBuilder] Use canonical i64 type for insertelement index used by vector splats.
Instcombine prefers this canonical form (see getPreferredVectorIndex),
as does IRBuilder when passing the index as an integer so we may as
well use the prefered form from creation.
NOTE: All test changes are mechanical with nothing else expected
beyond a change of index type from i32 to i64.
Differential Revision: https://reviews.llvm.org/D140983
Copy file name to clipboardExpand all lines: clang/test/CodeGen/aarch64-sve-vector-bitwise-ops.c
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -260,7 +260,7 @@ svuint64_t xor_u64(svuint64_t a, svuint64_t b) {
260
260
261
261
// CHECK-LABEL: @neg_bool(
262
262
// CHECK-NEXT: entry:
263
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 16 x i1> [[A:%.*]], shufflevector (<vscale x 16 x i1> insertelement (<vscale x 16 x i1> poison, i1 true, i32 0), <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer)
263
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 16 x i1> [[A:%.*]], shufflevector (<vscale x 16 x i1> insertelement (<vscale x 16 x i1> poison, i1 true, i64 0), <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer)
264
264
// CHECK-NEXT: ret <vscale x 16 x i1> [[NEG]]
265
265
//
266
266
svbool_tneg_bool(svbool_ta) {
@@ -269,7 +269,7 @@ svbool_t neg_bool(svbool_t a) {
269
269
270
270
// CHECK-LABEL: @neg_i8(
271
271
// CHECK-NEXT: entry:
272
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 16 x i8> [[A:%.*]], shufflevector (<vscale x 16 x i8> insertelement (<vscale x 16 x i8> poison, i8 -1, i32 0), <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer)
272
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 16 x i8> [[A:%.*]], shufflevector (<vscale x 16 x i8> insertelement (<vscale x 16 x i8> poison, i8 -1, i64 0), <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer)
273
273
// CHECK-NEXT: ret <vscale x 16 x i8> [[NEG]]
274
274
//
275
275
svint8_tneg_i8(svint8_ta) {
@@ -278,7 +278,7 @@ svint8_t neg_i8(svint8_t a) {
278
278
279
279
// CHECK-LABEL: @neg_i16(
280
280
// CHECK-NEXT: entry:
281
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 8 x i16> [[A:%.*]], shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> poison, i16 -1, i32 0), <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer)
281
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 8 x i16> [[A:%.*]], shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> poison, i16 -1, i64 0), <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer)
282
282
// CHECK-NEXT: ret <vscale x 8 x i16> [[NEG]]
283
283
//
284
284
svint16_tneg_i16(svint16_ta) {
@@ -287,7 +287,7 @@ svint16_t neg_i16(svint16_t a) {
287
287
288
288
// CHECK-LABEL: @neg_i32(
289
289
// CHECK-NEXT: entry:
290
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 4 x i32> [[A:%.*]], shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> poison, i32 -1, i32 0), <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer)
290
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 4 x i32> [[A:%.*]], shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> poison, i32 -1, i64 0), <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer)
291
291
// CHECK-NEXT: ret <vscale x 4 x i32> [[NEG]]
292
292
//
293
293
svint32_tneg_i32(svint32_ta) {
@@ -296,7 +296,7 @@ svint32_t neg_i32(svint32_t a) {
296
296
297
297
// CHECK-LABEL: @neg_i64(
298
298
// CHECK-NEXT: entry:
299
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 2 x i64> [[A:%.*]], shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i64 -1, i32 0), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer)
299
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 2 x i64> [[A:%.*]], shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i64 -1, i64 0), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer)
300
300
// CHECK-NEXT: ret <vscale x 2 x i64> [[NEG]]
301
301
//
302
302
svint64_tneg_i64(svint64_ta) {
@@ -305,7 +305,7 @@ svint64_t neg_i64(svint64_t a) {
305
305
306
306
// CHECK-LABEL: @neg_u8(
307
307
// CHECK-NEXT: entry:
308
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 16 x i8> [[A:%.*]], shufflevector (<vscale x 16 x i8> insertelement (<vscale x 16 x i8> poison, i8 -1, i32 0), <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer)
308
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 16 x i8> [[A:%.*]], shufflevector (<vscale x 16 x i8> insertelement (<vscale x 16 x i8> poison, i8 -1, i64 0), <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer)
309
309
// CHECK-NEXT: ret <vscale x 16 x i8> [[NEG]]
310
310
//
311
311
svuint8_tneg_u8(svuint8_ta) {
@@ -314,7 +314,7 @@ svuint8_t neg_u8(svuint8_t a) {
314
314
315
315
// CHECK-LABEL: @neg_u16(
316
316
// CHECK-NEXT: entry:
317
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 8 x i16> [[A:%.*]], shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> poison, i16 -1, i32 0), <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer)
317
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 8 x i16> [[A:%.*]], shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> poison, i16 -1, i64 0), <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer)
318
318
// CHECK-NEXT: ret <vscale x 8 x i16> [[NEG]]
319
319
//
320
320
svuint16_tneg_u16(svuint16_ta) {
@@ -323,7 +323,7 @@ svuint16_t neg_u16(svuint16_t a) {
323
323
324
324
// CHECK-LABEL: @neg_u32(
325
325
// CHECK-NEXT: entry:
326
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 4 x i32> [[A:%.*]], shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> poison, i32 -1, i32 0), <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer)
326
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 4 x i32> [[A:%.*]], shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> poison, i32 -1, i64 0), <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer)
327
327
// CHECK-NEXT: ret <vscale x 4 x i32> [[NEG]]
328
328
//
329
329
svuint32_tneg_u32(svuint32_ta) {
@@ -332,7 +332,7 @@ svuint32_t neg_u32(svuint32_t a) {
332
332
333
333
// CHECK-LABEL: @neg_u64(
334
334
// CHECK-NEXT: entry:
335
-
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 2 x i64> [[A:%.*]], shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i64 -1, i32 0), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer)
335
+
// CHECK-NEXT: [[NEG:%.*]] = xor <vscale x 2 x i64> [[A:%.*]], shufflevector (<vscale x 2 x i64> insertelement (<vscale x 2 x i64> poison, i64 -1, i64 0), <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer)
0 commit comments