From: Alex Lorenz <arphaman@gmail.com>
Date: Fri, 24 Jul 2015 17:36:55 +0000 (+0000)
Subject: MIR Tests: Add liveins and successors to make tests pass with machine verifier.
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4420c488b2b07d0ab0b173941d1827bfb6c546c6;p=oota-llvm.git

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
---

diff --git a/test/CodeGen/MIR/X86/cfi-offset.mir b/test/CodeGen/MIR/X86/cfi-offset.mir
index 548bcb45924..edfffda8641 100644
--- a/test/CodeGen/MIR/X86/cfi-offset.mir
+++ b/test/CodeGen/MIR/X86/cfi-offset.mir
@@ -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'
diff --git a/test/CodeGen/MIR/X86/external-symbol-operands.mir b/test/CodeGen/MIR/X86/external-symbol-operands.mir
index a786882bea6..78d66459af5 100644
--- a/test/CodeGen/MIR/X86/external-symbol-operands.mir
+++ b/test/CodeGen/MIR/X86/external-symbol-operands.mir
@@ -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'
diff --git a/test/CodeGen/MIR/X86/implicit-register-flag.mir b/test/CodeGen/MIR/X86/implicit-register-flag.mir
index 9c6882d27bd..cf2c930b64b 100644
--- a/test/CodeGen/MIR/X86/implicit-register-flag.mir
+++ b/test/CodeGen/MIR/X86/implicit-register-flag.mir
@@ -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'
diff --git a/test/CodeGen/MIR/X86/instructions-debug-location.mir b/test/CodeGen/MIR/X86/instructions-debug-location.mir
index c769666b9af..dc8eae1c0c9 100644
--- a/test/CodeGen/MIR/X86/instructions-debug-location.mir
+++ b/test/CodeGen/MIR/X86/instructions-debug-location.mir
@@ -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
diff --git a/test/CodeGen/MIR/X86/killed-register-flag.mir b/test/CodeGen/MIR/X86/killed-register-flag.mir
index d654a9d2fa5..fd5f881b0fd 100644
--- a/test/CodeGen/MIR/X86/killed-register-flag.mir
+++ b/test/CodeGen/MIR/X86/killed-register-flag.mir
@@ -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'
diff --git a/test/CodeGen/MIR/X86/machine-basic-block-operands.mir b/test/CodeGen/MIR/X86/machine-basic-block-operands.mir
index 607acb5f273..25cb7a1211a 100644
--- a/test/CodeGen/MIR/X86/machine-basic-block-operands.mir
+++ b/test/CodeGen/MIR/X86/machine-basic-block-operands.mir
@@ -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
diff --git a/test/CodeGen/MIR/X86/metadata-operands.mir b/test/CodeGen/MIR/X86/metadata-operands.mir
index 36f0ad86666..1f622b1098c 100644
--- a/test/CodeGen/MIR/X86/metadata-operands.mir
+++ b/test/CodeGen/MIR/X86/metadata-operands.mir
@@ -53,6 +53,7 @@ stack:
 body:
   - id:          0
     name:        entry
+    liveins:     [ '%edi' ]
     instructions:
       # CHECK:      %0 = COPY %edi
       # CHECK-NEXT: DBG_VALUE _, 0, !12, !13
diff --git a/test/CodeGen/MIR/X86/missing-implicit-operand.mir b/test/CodeGen/MIR/X86/missing-implicit-operand.mir
index 4d2cd03f4a3..b610f89d82b 100644
--- a/test/CodeGen/MIR/X86/missing-implicit-operand.mir
+++ b/test/CodeGen/MIR/X86/missing-implicit-operand.mir
@@ -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'
diff --git a/test/CodeGen/MIR/X86/subregister-operands.mir b/test/CodeGen/MIR/X86/subregister-operands.mir
index 5e46fab4b05..bbdf3fb4a67 100644
--- a/test/CodeGen/MIR/X86/subregister-operands.mir
+++ b/test/CodeGen/MIR/X86/subregister-operands.mir
@@ -21,6 +21,7 @@ registers:
 body:
   - name:        entry
     id:          0
+    liveins:     [ '%edi' ]
     instructions:
       # CHECK:      %0 = COPY %edi
       # CHECK-NEXT: %1 = COPY %0:sub_8bit
diff --git a/test/CodeGen/MIR/X86/virtual-registers.mir b/test/CodeGen/MIR/X86/virtual-registers.mir
index c6d76e6a18c..cde6b988519 100644
--- a/test/CodeGen/MIR/X86/virtual-registers.mir
+++ b/test/CodeGen/MIR/X86/virtual-registers.mir
@@ -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: