@@ -259,14 +259,38 @@ def : Pat<(select GPR32:$src1, complex:$src2, complex:$src3),
259
259
def ADD : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2),
260
260
[(set GPR32:$dst, (add GPR32:$src1, GPR32:$src2))]>;
261
261
262
- //===- Test a simple pattern with ValueType operands. ---- ------------------===//
262
+ //===- Test a pattern with a tied operand in the matcher ------------------===//
263
263
264
264
// CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 3*/ [[LABEL:[0-9]+]],
265
265
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
266
266
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_ADD,
267
267
// CHECK-NEXT: // MIs[0] dst
268
268
// CHECK-NEXT: GIM_CheckType, /*MI*/0, /*Op*/0, /*Type*/GILLT_s32,
269
269
// CHECK-NEXT: GIM_CheckRegBankForClass, /*MI*/0, /*Op*/0, /*RC*/MyTarget::GPR32RegClassID,
270
+ // CHECK-NEXT: // MIs[0] src{{$}}
271
+ // CHECK-NEXT: GIM_CheckType, /*MI*/0, /*Op*/1, /*Type*/GILLT_s32,
272
+ // CHECK-NEXT: GIM_CheckRegBankForClass, /*MI*/0, /*Op*/1, /*RC*/MyTarget::GPR32RegClassID,
273
+ // CHECK-NEXT: // MIs[0] src{{$}}
274
+ // CHECK-NEXT: GIM_CheckIsSameOperand, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
275
+ // CHECK-NEXT: // (add:{ *:[i32] } GPR32:{ *:[i32] }:$src, GPR32:{ *:[i32] }:$src) => (DOUBLE:{ *:[i32] } GPR32:{ *:[i32] }:$src)
276
+ // CHECK-NEXT: GIR_BuildMI, /*InsnID*/0, /*Opcode*/MyTarget::DOUBLE,
277
+ // CHECK-NEXT: GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/0, // dst
278
+ // CHECK-NEXT: GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/0, /*OpIdx*/1, // src
279
+ // CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
280
+ // CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
281
+ // CHECK-NEXT: GIR_Done,
282
+ // CHECK-NEXT: // Label 3: @[[LABEL]]
283
+
284
+ def DOUBLE : I<(outs GPR32:$dst), (ins GPR32:$src), [(set GPR32:$dst, (add GPR32:$src, GPR32:$src))]>;
285
+
286
+ //===- Test a simple pattern with ValueType operands. ----------------------===//
287
+
288
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 4*/ [[LABEL:[0-9]+]],
289
+ // CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
290
+ // CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_ADD,
291
+ // CHECK-NEXT: // MIs[0] dst
292
+ // CHECK-NEXT: GIM_CheckType, /*MI*/0, /*Op*/0, /*Type*/GILLT_s32,
293
+ // CHECK-NEXT: GIM_CheckRegBankForClass, /*MI*/0, /*Op*/0, /*RC*/MyTarget::GPR32RegClassID,
270
294
// CHECK-NEXT: // MIs[0] src1
271
295
// CHECK-NEXT: GIM_CheckType, /*MI*/0, /*Op*/1, /*Type*/GILLT_s32,
272
296
// CHECK-NEXT: // MIs[0] src2
@@ -275,15 +299,15 @@ def ADD : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2),
275
299
// CHECK-NEXT: GIR_MutateOpcode, /*InsnID*/0, /*RecycleInsnID*/0, /*Opcode*/MyTarget::ADD,
276
300
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
277
301
// CHECK-NEXT: GIR_Done,
278
- // CHECK-NEXT: // Label 3 : @[[LABEL]]
302
+ // CHECK-NEXT: // Label 4 : @[[LABEL]]
279
303
280
304
def : Pat<(add i32:$src1, i32:$src2),
281
305
(ADD i32:$src1, i32:$src2)>;
282
306
283
307
//===- Test a simple pattern with an intrinsic. ---------------------------===//
284
308
//
285
309
286
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 4 */ [[LABEL:[0-9]+]],
310
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 5 */ [[LABEL:[0-9]+]],
287
311
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
288
312
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_INTRINSIC,
289
313
// CHECK-NEXT: // MIs[0] dst
@@ -302,14 +326,14 @@ def : Pat<(add i32:$src1, i32:$src2),
302
326
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
303
327
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
304
328
// CHECK-NEXT: GIR_Done,
305
- // CHECK-NEXT: // Label 4 : @[[LABEL]]
329
+ // CHECK-NEXT: // Label 5 : @[[LABEL]]
306
330
307
331
def MOV : I<(outs GPR32:$dst), (ins GPR32:$src1),
308
332
[(set GPR32:$dst, (int_mytarget_nop GPR32:$src1))]>;
309
333
310
334
//===- Test a nested instruction match. -----------------------------------===//
311
335
312
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 5 */ [[LABEL:[0-9]+]],
336
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 6 */ [[LABEL:[0-9]+]],
313
337
// CHECK-NEXT: GIM_CheckFeatures, GIFBS_HasA,
314
338
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
315
339
// CHECK-NEXT: GIM_RecordInsn, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
@@ -342,10 +366,10 @@ def MOV : I<(outs GPR32:$dst), (ins GPR32:$src1),
342
366
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
343
367
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
344
368
// CHECK-NEXT: GIR_Done,
345
- // CHECK-NEXT: // Label 5 : @[[LABEL]]
369
+ // CHECK-NEXT: // Label 6 : @[[LABEL]]
346
370
347
371
// We also get a second rule by commutativity.
348
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 6 */ [[LABEL:[0-9]+]],
372
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 7 */ [[LABEL:[0-9]+]],
349
373
// CHECK-NEXT: GIM_CheckFeatures, GIFBS_HasA,
350
374
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
351
375
// CHECK-NEXT: GIM_RecordInsn, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2,
@@ -378,7 +402,7 @@ def MOV : I<(outs GPR32:$dst), (ins GPR32:$src1),
378
402
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
379
403
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
380
404
// CHECK-NEXT: GIR_Done,
381
- // CHECK-NEXT: // Label 6 : @[[LABEL]]
405
+ // CHECK-NEXT: // Label 7 : @[[LABEL]]
382
406
383
407
def MULADD : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2, GPR32:$src3),
384
408
[(set GPR32:$dst,
@@ -387,7 +411,7 @@ def MULADD : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2, GPR32:$src3),
387
411
388
412
//===- Test another simple pattern with regclass operands. ----------------===//
389
413
390
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 7 */ [[LABEL:[0-9]+]],
414
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 8 */ [[LABEL:[0-9]+]],
391
415
// CHECK-NEXT: GIM_CheckFeatures, GIFBS_HasA_HasB_HasC,
392
416
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
393
417
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_MUL,
@@ -408,15 +432,15 @@ def MULADD : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2, GPR32:$src3),
408
432
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
409
433
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
410
434
// CHECK-NEXT: GIR_Done,
411
- // CHECK-NEXT: // Label 7 : @[[LABEL]]
435
+ // CHECK-NEXT: // Label 8 : @[[LABEL]]
412
436
413
437
def MUL : I<(outs GPR32:$dst), (ins GPR32:$src2, GPR32:$src1),
414
438
[(set GPR32:$dst, (mul GPR32:$src1, GPR32:$src2))]>,
415
439
Requires<[HasA, HasB, HasC]>;
416
440
417
441
//===- Test a more complex multi-instruction match. -----------------------===//
418
442
419
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 8 */ [[LABEL:[0-9]+]],
443
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 9 */ [[LABEL:[0-9]+]],
420
444
// CHECK-NEXT: GIM_CheckFeatures, GIFBS_HasA,
421
445
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
422
446
// CHECK-NEXT: GIM_RecordInsn, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
@@ -461,7 +485,7 @@ def MUL : I<(outs GPR32:$dst), (ins GPR32:$src2, GPR32:$src1),
461
485
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
462
486
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
463
487
// CHECK-NEXT: GIR_Done,
464
- // CHECK-NEXT: // Label 8 : @[[LABEL]]
488
+ // CHECK-NEXT: // Label 9 : @[[LABEL]]
465
489
466
490
def INSNBOB : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2, GPR32:$src3, GPR32:$src4),
467
491
[(set GPR32:$dst,
@@ -471,7 +495,7 @@ def INSNBOB : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2, GPR32:$src3, G
471
495
//===- Test a pattern with ComplexPattern operands. -----------------------===//
472
496
//
473
497
474
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 9 */ [[LABEL:[0-9]+]],
498
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 10 */ [[LABEL:[0-9]+]],
475
499
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
476
500
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_SUB,
477
501
// CHECK-NEXT: // MIs[0] dst
@@ -491,15 +515,15 @@ def INSNBOB : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2, GPR32:$src3, G
491
515
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
492
516
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
493
517
// CHECK-NEXT: GIR_Done,
494
- // CHECK-NEXT: // Label 9 : @[[LABEL]]
518
+ // CHECK-NEXT: // Label 10 : @[[LABEL]]
495
519
496
520
def INSN1 : I<(outs GPR32:$dst), (ins GPR32:$src1, complex:$src2), []>;
497
521
def : Pat<(sub GPR32:$src1, complex:$src2), (INSN1 GPR32:$src1, complex:$src2)>;
498
522
499
523
//===- Test a simple pattern with a default operand. ----------------------===//
500
524
//
501
525
502
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 10 */ [[LABEL:[0-9]+]],
526
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 11 */ [[LABEL:[0-9]+]],
503
527
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
504
528
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_XOR,
505
529
// CHECK-NEXT: // MIs[0] dst
@@ -519,7 +543,7 @@ def : Pat<(sub GPR32:$src1, complex:$src2), (INSN1 GPR32:$src1, complex:$src2)>;
519
543
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
520
544
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
521
545
// CHECK-NEXT: GIR_Done,
522
- // CHECK-NEXT: // Label 10 : @[[LABEL]]
546
+ // CHECK-NEXT: // Label 11 : @[[LABEL]]
523
547
524
548
// The -2 is just to distinguish it from the 'not' case below.
525
549
def XORI : I<(outs GPR32:$dst), (ins m1:$src2, GPR32:$src1),
@@ -528,7 +552,7 @@ def XORI : I<(outs GPR32:$dst), (ins m1:$src2, GPR32:$src1),
528
552
//===- Test a simple pattern with a default register operand. -------------===//
529
553
//
530
554
531
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 11 */ [[LABEL:[0-9]+]],
555
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 12 */ [[LABEL:[0-9]+]],
532
556
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
533
557
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_XOR,
534
558
// CHECK-NEXT: // MIs[0] dst
@@ -548,7 +572,7 @@ def XORI : I<(outs GPR32:$dst), (ins m1:$src2, GPR32:$src1),
548
572
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
549
573
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
550
574
// CHECK-NEXT: GIR_Done,
551
- // CHECK-NEXT: // Label 11 : @[[LABEL]]
575
+ // CHECK-NEXT: // Label 12 : @[[LABEL]]
552
576
553
577
// The -3 is just to distinguish it from the 'not' case below and the other default op case above.
554
578
def XOR : I<(outs GPR32:$dst), (ins Z:$src2, GPR32:$src1),
@@ -557,7 +581,7 @@ def XOR : I<(outs GPR32:$dst), (ins Z:$src2, GPR32:$src1),
557
581
//===- Test a simple pattern with a multiple default operands. ------------===//
558
582
//
559
583
560
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 12 */ [[LABEL:[0-9]+]],
584
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 13 */ [[LABEL:[0-9]+]],
561
585
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
562
586
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_XOR,
563
587
// CHECK-NEXT: // MIs[0] dst
@@ -578,7 +602,7 @@ def XOR : I<(outs GPR32:$dst), (ins Z:$src2, GPR32:$src1),
578
602
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
579
603
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
580
604
// CHECK-NEXT: GIR_Done,
581
- // CHECK-NEXT: // Label 12 : @[[LABEL]]
605
+ // CHECK-NEXT: // Label 13 : @[[LABEL]]
582
606
583
607
// The -4 is just to distinguish it from the other 'not' cases.
584
608
def XORlike : I<(outs GPR32:$dst), (ins m1Z:$src2, GPR32:$src1),
@@ -587,7 +611,7 @@ def XORlike : I<(outs GPR32:$dst), (ins m1Z:$src2, GPR32:$src1),
587
611
//===- Test a simple pattern with multiple operands with defaults. --------===//
588
612
//
589
613
590
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 13 */ [[LABEL:[0-9]+]],
614
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 14 */ [[LABEL:[0-9]+]],
591
615
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
592
616
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_XOR,
593
617
// CHECK-NEXT: // MIs[0] dst
@@ -609,7 +633,7 @@ def XORlike : I<(outs GPR32:$dst), (ins m1Z:$src2, GPR32:$src1),
609
633
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
610
634
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
611
635
// CHECK-NEXT: GIR_Done,
612
- // CHECK-NEXT: // Label 13 : @[[LABEL]]
636
+ // CHECK-NEXT: // Label 14 : @[[LABEL]]
613
637
614
638
// The -5 is just to distinguish it from the other cases.
615
639
def XORManyDefaults : I<(outs GPR32:$dst), (ins m1Z:$src3, Z:$src2, GPR32:$src1),
@@ -620,7 +644,7 @@ def XORManyDefaults : I<(outs GPR32:$dst), (ins m1Z:$src3, Z:$src2, GPR32:$src1)
620
644
// This must precede the 3-register variants because constant immediates have
621
645
// priority over register banks.
622
646
623
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 14 */ [[LABEL:[0-9]+]],
647
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 15 */ [[LABEL:[0-9]+]],
624
648
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
625
649
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_XOR,
626
650
// CHECK-NEXT: // MIs[0] dst
@@ -640,15 +664,15 @@ def XORManyDefaults : I<(outs GPR32:$dst), (ins m1Z:$src3, Z:$src2, GPR32:$src1)
640
664
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
641
665
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
642
666
// CHECK-NEXT: GIR_Done,
643
- // CHECK-NEXT: // Label 14 : @[[LABEL]]
667
+ // CHECK-NEXT: // Label 15 : @[[LABEL]]
644
668
645
669
def ORN : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2), []>;
646
670
def : Pat<(not GPR32:$Wm), (ORN R0, GPR32:$Wm)>;
647
671
648
672
//===- Test a COPY_TO_REGCLASS --------------------------------------------===//
649
673
//
650
674
651
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 15 */ [[LABEL:[0-9]+]],
675
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 16 */ [[LABEL:[0-9]+]],
652
676
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/2,
653
677
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_BITCAST,
654
678
// CHECK-NEXT: // MIs[0] dst
@@ -661,14 +685,14 @@ def : Pat<(not GPR32:$Wm), (ORN R0, GPR32:$Wm)>;
661
685
// CHECK-NEXT: GIR_MutateOpcode, /*InsnID*/0, /*RecycleInsnID*/0, /*Opcode*/TargetOpcode::COPY,
662
686
// CHECK-NEXT: GIR_ConstrainOperandRC, /*InsnID*/0, /*Op*/0, /*RC GPR32*/1,
663
687
// CHECK-NEXT: GIR_Done,
664
- // CHECK-NEXT: // Label 15 : @[[LABEL]]
688
+ // CHECK-NEXT: // Label 16 : @[[LABEL]]
665
689
666
690
def : Pat<(i32 (bitconvert FPR32:$src1)),
667
691
(COPY_TO_REGCLASS FPR32:$src1, GPR32)>;
668
692
669
693
//===- Test a simple pattern with just a specific leaf immediate. ---------===//
670
694
671
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 16 */ [[LABEL:[0-9]+]],
695
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 17 */ [[LABEL:[0-9]+]],
672
696
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/2,
673
697
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_CONSTANT,
674
698
// CHECK-NEXT: // MIs[0] dst
@@ -682,13 +706,13 @@ def : Pat<(i32 (bitconvert FPR32:$src1)),
682
706
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
683
707
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
684
708
// CHECK-NEXT: GIR_Done,
685
- // CHECK-NEXT: // Label 16 : @[[LABEL]]
709
+ // CHECK-NEXT: // Label 17 : @[[LABEL]]
686
710
687
711
def MOV1 : I<(outs GPR32:$dst), (ins), [(set GPR32:$dst, 1)]>;
688
712
689
713
//===- Test a simple pattern with a leaf immediate and a predicate. -------===//
690
714
691
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 17 */ [[LABEL:[0-9]+]],
715
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 18 */ [[LABEL:[0-9]+]],
692
716
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/2,
693
717
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_CONSTANT,
694
718
// CHECK-NEXT: GIM_CheckI64ImmPredicate, /*MI*/0, /*Predicate*/GIPFP_I64_Predicate_simm8,
@@ -704,14 +728,14 @@ def MOV1 : I<(outs GPR32:$dst), (ins), [(set GPR32:$dst, 1)]>;
704
728
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
705
729
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
706
730
// CHECK-NEXT: GIR_Done,
707
- // CHECK-NEXT: // Label 17 : @[[LABEL]]
731
+ // CHECK-NEXT: // Label 18 : @[[LABEL]]
708
732
709
733
def simm8 : ImmLeaf<i32, [{ return isInt<8>(Imm); }]>;
710
734
def MOVimm8 : I<(outs GPR32:$dst), (ins i32imm:$imm), [(set GPR32:$dst, simm8:$imm)]>;
711
735
712
736
//===- Same again but use an IntImmLeaf. ----------------------------------===//
713
737
714
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 18 */ [[LABEL:[0-9]+]],
738
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 19 */ [[LABEL:[0-9]+]],
715
739
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/2,
716
740
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_CONSTANT,
717
741
// CHECK-NEXT: GIM_CheckAPIntImmPredicate, /*MI*/0, /*Predicate*/GIPFP_APInt_Predicate_simm9,
@@ -727,14 +751,14 @@ def MOVimm8 : I<(outs GPR32:$dst), (ins i32imm:$imm), [(set GPR32:$dst, simm8:$i
727
751
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
728
752
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
729
753
// CHECK-NEXT: GIR_Done,
730
- // CHECK-NEXT: // Label 18 : @[[LABEL]]
754
+ // CHECK-NEXT: // Label 19 : @[[LABEL]]
731
755
732
756
def simm9 : IntImmLeaf<i32, [{ return isInt<9>(Imm->getSExtValue()); }]>;
733
757
def MOVimm9 : I<(outs GPR32:$dst), (ins i32imm:$imm), [(set GPR32:$dst, simm9:$imm)]>;
734
758
735
759
//===- Test a simple pattern with just a leaf immediate. ------------------===//
736
760
737
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 19 */ [[LABEL:[0-9]+]],
761
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 20 */ [[LABEL:[0-9]+]],
738
762
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/2,
739
763
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_CONSTANT,
740
764
// CHECK-NEXT: // MIs[0] dst
@@ -749,13 +773,13 @@ def MOVimm9 : I<(outs GPR32:$dst), (ins i32imm:$imm), [(set GPR32:$dst, simm9:$i
749
773
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
750
774
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
751
775
// CHECK-NEXT: GIR_Done,
752
- // CHECK-NEXT: // Label 19 : @[[LABEL]]
776
+ // CHECK-NEXT: // Label 20 : @[[LABEL]]
753
777
754
778
def MOVimm : I<(outs GPR32:$dst), (ins i32imm:$imm), [(set GPR32:$dst, imm:$imm)]>;
755
779
756
780
//===- Test a simple pattern with a FP immediate and a predicate. ---------===//
757
781
758
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 20 */ [[LABEL:[0-9]+]],
782
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 21 */ [[LABEL:[0-9]+]],
759
783
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/2,
760
784
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_FCONSTANT,
761
785
// CHECK-NEXT: GIM_CheckAPFloatImmPredicate, /*MI*/0, /*Predicate*/GIPFP_APFloat_Predicate_fpimmz,
@@ -771,14 +795,14 @@ def MOVimm : I<(outs GPR32:$dst), (ins i32imm:$imm), [(set GPR32:$dst, imm:$imm)
771
795
// CHECK-NEXT: GIR_EraseFromParent, /*InsnID*/0,
772
796
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
773
797
// CHECK-NEXT: GIR_Done,
774
- // CHECK-NEXT: // Label 20 : @[[LABEL]]
798
+ // CHECK-NEXT: // Label 21 : @[[LABEL]]
775
799
776
800
def fpimmz : FPImmLeaf<f32, [{ return Imm->isExactlyValue(0.0); }]>;
777
801
def MOVfpimmz : I<(outs FPR32:$dst), (ins f32imm:$imm), [(set FPR32:$dst, fpimmz:$imm)]>;
778
802
779
803
//===- Test a pattern with an MBB operand. --------------------------------===//
780
804
781
- // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 21 */ [[LABEL:[0-9]+]],
805
+ // CHECK-NEXT: GIM_Try, /*On fail goto*//*Label 22 */ [[LABEL:[0-9]+]],
782
806
// CHECK-NEXT: GIM_CheckNumOperands, /*MI*/0, /*Expected*/1,
783
807
// CHECK-NEXT: GIM_CheckOpcode, /*MI*/0, TargetOpcode::G_BR,
784
808
// CHECK-NEXT: // MIs[0] target
@@ -787,7 +811,7 @@ def MOVfpimmz : I<(outs FPR32:$dst), (ins f32imm:$imm), [(set FPR32:$dst, fpimmz
787
811
// CHECK-NEXT: GIR_MutateOpcode, /*InsnID*/0, /*RecycleInsnID*/0, /*Opcode*/MyTarget::BR,
788
812
// CHECK-NEXT: GIR_ConstrainSelectedInstOperands, /*InsnID*/0,
789
813
// CHECK-NEXT: GIR_Done,
790
- // CHECK-NEXT: // Label 21 : @[[LABEL]]
814
+ // CHECK-NEXT: // Label 22 : @[[LABEL]]
791
815
792
816
def BR : I<(outs), (ins unknown:$target),
793
817
[(br bb:$target)]>;
0 commit comments