MIR Serialization: Serialize the jump table index operands.
[oota-llvm.git] / test / CodeGen / MIR / X86 / undef-register-flag.mir
1 # RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
2 # This test ensures that the MIR parser parses the 'undef' register flags
3 # correctly.
4
5 --- |
6
7   define i32 @compute(i32 %a) #0 {
8   body:
9     %c = mul i32 %a, 11
10     ret i32 %c
11   }
12
13   define i32 @foo(i32 %a) #0 {
14   entry:
15     %b = call i32 @compute(i32 %a)
16     ret i32 %b
17   }
18
19   attributes #0 = { "no-frame-pointer-elim"="false" }
20
21 ...
22 ---
23 name:            compute
24 body:
25   - id:          0
26     name:        body
27     instructions:
28       - '%eax = IMUL32rri8 %edi, 11, implicit-def %eflags'
29       - 'RETQ %eax'
30 ...
31 ---
32 name:            foo
33 body:
34   - id:          0
35     name:        entry
36     instructions:
37       # CHECK: - 'PUSH64r undef %rax
38       - 'PUSH64r undef %rax, implicit-def %rsp, implicit %rsp'
39       - 'CALL64pcrel32 @compute, csr_64, implicit %rsp, implicit %edi, implicit-def %rsp, implicit-def %eax'
40       - '%rdx = POP64r implicit-def %rsp, implicit %rsp'
41       - 'RETQ %eax'
42 ...