MIR Tests: Add liveins and successors to make tests pass with machine verifier.
authorAlex Lorenz <arphaman@gmail.com>
Fri, 24 Jul 2015 17:36:55 +0000 (17:36 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 24 Jul 2015 17:36:55 +0000 (17:36 +0000)
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

test/CodeGen/MIR/X86/cfi-offset.mir
test/CodeGen/MIR/X86/external-symbol-operands.mir
test/CodeGen/MIR/X86/implicit-register-flag.mir
test/CodeGen/MIR/X86/instructions-debug-location.mir
test/CodeGen/MIR/X86/killed-register-flag.mir
test/CodeGen/MIR/X86/machine-basic-block-operands.mir
test/CodeGen/MIR/X86/metadata-operands.mir
test/CodeGen/MIR/X86/missing-implicit-operand.mir
test/CodeGen/MIR/X86/subregister-operands.mir
test/CodeGen/MIR/X86/virtual-registers.mir

index 548bcb459247a28389b6e72e088779b4877846a8..edfffda8641fa557598cf8d80dc48f0a8335a856 100644 (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'
index a786882bea640bb89db64d995599cdb7cf91fbf7..78d66459af520cc6e741957bf611661683dc397a 100644 (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'
index 9c6882d27bdc2a00dafe1849bb82a7730411de07..cf2c930b64b3327020fbfc0383b31f912c170b50 100644 (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'
index c769666b9afde5d77c56a82447286e720b026c71..dc8eae1c0c93bebea54e3db62b5c192d6b3c6038 100644 (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
index d654a9d2fa562bbb66eef4ab982eec8f7420447e..fd5f881b0fd874aa3aa09c6fb2ce48a9cc774659 100644 (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'
index 607acb5f273ebe3390f36c2a3b6888272060fb2b..25cb7a1211a68419db341f2b9dac1bfab2646c88 100644 (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
index 36f0ad8666607c713edea1febc039eb237740a2e..1f622b1098c24abb7a9fa39d3c49985598148659 100644 (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
index 4d2cd03f4a3dd6132f22cb114dc75a101dfa39a2..b610f89d82baa9977a4fa723331a86b771781d81 100644 (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'
index 5e46fab4b0585167d783a36fd58898daf2648210..bbdf3fb4a671c08b5f8f0c57180ee8f513f30e21 100644 (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
index c6d76e6a18c5841429e897791504a4b54ecb3959..cde6b988519ab29a8d5b93e8ed5d7c4d19e189c5 100644 (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: