ca34fe1050dea31f3470b83888115ad71d93fc05
[oota-llvm.git] / test / CodeGen / MIR / X86 / frame-setup-instruction-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 frame setup instruction flag.
3
4 --- |
5
6   define i32 @compute(i32 %a) {
7   body:
8     %c = mul i32 %a, 11
9     ret i32 %c
10   }
11
12   define i32 @foo(i32 %a) {
13   entry:
14     %b = call i32 @compute(i32 %a)
15     ret i32 %b
16   }
17
18 ...
19 ---
20 name:            compute
21 body:
22   - name:        body
23     id:          0
24     instructions:
25       - '%eax = IMUL32rri8 %edi, 11, implicit-def %eflags'
26       - 'RETQ %eax'
27 ...
28 ---
29 name:            foo
30 body:
31   - name:        entry
32     id:          0
33     instructions:
34       # CHECK: frame-setup PUSH64r %rax
35       - 'frame-setup PUSH64r %rax, implicit-def %rsp, implicit %rsp'
36       - 'CALL64pcrel32 @compute, csr_64, implicit %rsp, implicit %edi, implicit-def %rsp, implicit-def %eax'
37       - '%rdx = POP64r implicit-def %rsp, implicit %rsp'
38       - 'RETQ %eax'
39 ...