MIR Tests: Add liveins and successors to make tests pass with machine verifier.

This commit adds the liveins and successors properties to machine basic blocks
in some of the MIR tests to ensure that the tests will pass when the MIR parser
will run the machine verifier after initializing a machine function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alex Lorenz 2015-07-24 17:36:55 +00:00
parent 9b1988a840
commit 4420c488b2
10 changed files with 15 additions and 0 deletions

View File

@ -29,6 +29,7 @@ fixedStack:
body:
- id: 0
name: entry
liveins: [ '%ecx', '%edi', '%edx', '%esi', '%rbx' ]
instructions:
- 'PUSH64r killed %rbx, implicit-def %rsp, implicit %rsp'
- 'CFI_INSTRUCTION .cfi_def_cfa_offset 16'

View File

@ -33,6 +33,7 @@ body:
- id: 0
name: entry
successors: [ '%bb.1.entry', '%bb.2.entry' ]
liveins: [ '%edi' ]
instructions:
- '%rsp = SUB64ri32 %rsp, 520, implicit-def %eflags'
- '%rcx = LOAD_STACK_GUARD'
@ -43,6 +44,7 @@ body:
- 'JNE_1 %bb.2.entry, implicit %eflags'
- id: 1
name: entry
liveins: [ '%eax' ]
instructions:
- '%rsp = ADD64ri32 %rsp, 520, implicit-def %eflags'
- 'RETQ %eax'

View File

@ -22,6 +22,7 @@ name: foo
body:
- id: 0
name: entry
successors: [ '%bb.1.less', '%bb.2.exit' ]
instructions:
# CHECK: - 'CMP32ri8 %edi, 10, implicit-def %eflags'
# CHECK-NEXT: - 'JG_1 %bb.2.exit, implicit %eflags'

View File

@ -53,6 +53,7 @@ stack:
body:
- id: 0
name: entry
liveins: [ '%edi' ]
instructions:
# CHECK: DBG_VALUE _, 0, !12, !13, debug-location !14
# CHECK: %eax = COPY %0, debug-location !15

View File

@ -22,6 +22,7 @@ name: foo
body:
- id: 0
name: entry
successors: [ '%bb.1.less', '%bb.2.exit' ]
instructions:
- 'CMP32ri8 %edi, 10, implicit-def %eflags'
- 'JG_1 %bb.2.exit, implicit %eflags'

View File

@ -37,6 +37,7 @@ body:
# CHECK: name: entry
- id: 0
name: entry
successors: [ '%bb.1.less', '%bb.2.exit' ]
instructions:
- '%eax = MOV32rm %rdi, 1, _, 0, _'
# CHECK: - 'CMP32ri8 %eax, 10
@ -60,6 +61,7 @@ body:
# CHECK: name: entry
- id: 0
name: entry
successors: [ '%bb.1', '%bb.3' ]
instructions:
- '%eax = MOV32rm %rdi, 1, _, 0, _'
# CHECK: - 'CMP32ri8 %eax, 10

View File

@ -53,6 +53,7 @@ stack:
body:
- id: 0
name: entry
liveins: [ '%edi' ]
instructions:
# CHECK: %0 = COPY %edi
# CHECK-NEXT: DBG_VALUE _, 0, !12, !13

View File

@ -24,6 +24,7 @@ name: foo
body:
- id: 0
name: entry
successors: [ '%bb.1.less', '%bb.2.exit' ]
instructions:
- '%eax = MOV32rm %rdi, 1, _, 0, _'
- 'CMP32ri8 %eax, 10, implicit-def %eflags'

View File

@ -21,6 +21,7 @@ registers:
body:
- name: entry
id: 0
liveins: [ '%edi' ]
instructions:
# CHECK: %0 = COPY %edi
# CHECK-NEXT: %1 = COPY %0:sub_8bit

View File

@ -44,6 +44,8 @@ registers:
body:
- id: 0
name: entry
successors: [ '%bb.2.exit', '%bb.1.less' ]
liveins: [ '%edi' ]
# CHECK: %0 = COPY %edi
# CHECK-NEXT: %1 = SUB32ri8 %0, 10
instructions:
@ -81,6 +83,8 @@ registers:
body:
- id: 0
name: entry
successors: [ '%bb.2.exit', '%bb.1.less' ]
liveins: [ '%edi' ]
# CHECK: %0 = COPY %edi
# CHECK-NEXT: %1 = SUB32ri8 %0, 10
instructions: