[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / MC / SystemZ / asm-match.s
blob0353f27583a9eb1b547b850948c5d37b62e827e8
1 // REQUIRES: asserts
2 // RUN: llvm-mc -triple s390x-linux-gnu -debug-only=asm-matcher %s 2>&1 | FileCheck %s
3 //
4 // Check that debug output prints the operands correctly.
6 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'sllg'
7 // CHECK: Trying to match opcode SLLG
8 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 1 (Reg:r3): match success using generic matcher
9 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 2 (Reg:r0): match success using generic matcher
10 // CHECK: Matching formal operand class MCK_BDAddr32Disp20 against actual operand at index 3 (Mem:3): match success using generic matcher
11 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 4: actual operand index out of range
12 // CHECK: Opcode result: complete match, selecting this opcode
13 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'llill'
14 // CHECK: Trying to match opcode LLILL
15 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 1 (Reg:r0): match success using generic matcher
16 // CHECK: Matching formal operand class MCK_U16Imm against actual operand at index 2 (Imm:0): match success using generic matcher
17 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 3: actual operand index out of range
18 // CHECK: Opcode result: complete match, selecting this opcode
19 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'lgr'
20 // CHECK: Trying to match opcode LGR
21 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 1 (Reg:r1): match success using generic matcher
22 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 2 (Reg:r0): match success using generic matcher
23 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 3: actual operand index out of range
24 // CHECK: Opcode result: complete match, selecting this opcode
25 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'lg'
26 // CHECK: Trying to match opcode LG
27 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 1 (Reg:r1): match success using generic matcher
28 // CHECK: Matching formal operand class MCK_BDXAddr64Disp20 against actual operand at index 2 (Mem:16(r2)): match success using generic matcher
29 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 3: actual operand index out of range
30 // CHECK: Opcode result: complete match, selecting this opcode
31 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'lg'
32 // CHECK: Trying to match opcode LG
33 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 1 (Reg:r1): match success using generic matcher
34 // CHECK: Matching formal operand class MCK_BDXAddr64Disp20 against actual operand at index 2 (Mem:16(r2,r3)): match success using generic matcher
35 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 3: actual operand index out of range
36 // CHECK: Opcode result: complete match, selecting this opcode
37 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'stmg'
38 // CHECK: Trying to match opcode STMG
39 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 1 (Reg:r13): match success using generic matcher
40 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 2 (Reg:r15): match success using generic matcher
41 // CHECK: Matching formal operand class MCK_BDAddr64Disp20 against actual operand at index 3 (Mem:104(r15)): match success using generic matcher
42 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 4: actual operand index out of range
43 // CHECK: Opcode result: complete match, selecting this opcode
44 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'mvc'
45 // CHECK: Trying to match opcode MVC
46 // CHECK: Matching formal operand class MCK_BDLAddr64Disp12Len8 against actual operand at index 1 (Mem:184(8,r15)): match success using generic matcher
47 // CHECK: Matching formal operand class MCK_BDAddr64Disp12 against actual operand at index 2 (Mem:8(r2)): match success using generic matcher
48 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 3: actual operand index out of range
49 // CHECK: Opcode result: complete match, selecting this opcode
50 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'mvck'
51 // CHECK: Trying to match opcode MVCK
52 // CHECK: Matching formal operand class MCK_BDRAddr64Disp12 against actual operand at index 1 (Mem:0(r0,r1)): match success using generic matcher
53 // CHECK: Matching formal operand class MCK_BDAddr64Disp12 against actual operand at index 2 (Mem:4095(r15)): match success using generic matcher
54 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 3 (Reg:r2): match success using generic matcher
55 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 4: actual operand index out of range
56 // CHECK: Opcode result: complete match, selecting this opcode
57 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'j'
58 // CHECK: Trying to match opcode J
59 // CHECK: Matching formal operand class MCK_PCRel16 against actual operand at index 1 (Imm:.Ltmp0+2): match success using generic matcher
60 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 2: actual operand index out of range
61 // CHECK: Opcode result: complete match, selecting this opcode
62 // CHECK: AsmMatcher: found 1 encodings with mnemonic 'brasl'
63 // CHECK: Trying to match opcode BRASL
64 // CHECK: Matching formal operand class MCK_GR64 against actual operand at index 1 (Reg:r14): match success using generic matcher
65 // CHECK: Matching formal operand class MCK_PCRelTLS32 against actual operand at index 2 (ImmTLS:fun): match success using generic matcher
66 // CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 3: actual operand index out of range
67 // CHECK: Opcode result: complete match, selecting this opcode
68 // CHECK: .text
69 // CHECK: sllg %r3, %r0, 3
70 // CHECK: llill %r0, 0
71 // CHECK: lgr %r1, %r0
72 // CHECK: lg %r1, 16(%r2)
73 // CHECK: lg %r1, 16(%r2,%r3)
74 // CHECK: stmg %r13, %r15, 104(%r15)
75 // CHECK: mvc 184(8,%r15), 8(%r2)
76 // CHECK: mvck 0(%r0,%r1), 4095(%r15), %r2
77 // CHECK: .Ltmp0:
78 // CHECK: j .Ltmp0+2
79 // CHECK: brasl %r14, fun
81 sllg %r3, %r0, 3
82 llill %r0, 0
83 lgr %r1, %r0
84 lg %r1, 16(%r2)
85 lg %r1, 16(%r2,%r3)
86 stmg %r13, %r15, 104(%r15)
87 mvc 184(8,%r15), 8(%r2)
88 mvck 0(%r0,%r1), 4095(%r15), %r2
89 .Ltmp0:
90 j .Ltmp0+2
91 brasl %r14, fun