llvm/llvm/test/CodeGen/AMDGPU/return-with-successors.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs -run-pass=liveintervals -o - %s | FileCheck %s
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 --passes='print<live-intervals>' -o - %s | FileCheck %s
# Test that getNoPreservedMask is implemented, which is called when
# return blocks have successors.

---
name: endpgm_with_successors
tracksRegLiveness: true
body:             |
  ; CHECK-LABEL: name: endpgm_with_successors
  ; CHECK: bb.0:
  ; CHECK-NEXT:   successors: %bb.1(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   S_ENDPGM 0
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.1:
  ; CHECK-NEXT:   S_NOP 0
  bb.0:
    successors: %bb.1
    S_ENDPGM 0

  bb.1:
    S_NOP 0

...

---
name: setpc_with_successors
tracksRegLiveness: true
body:             |
  ; CHECK-LABEL: name: setpc_with_successors
  ; CHECK: bb.0:
  ; CHECK-NEXT:   successors: %bb.1(0x80000000)
  ; CHECK-NEXT:   liveins: $sgpr30_sgpr31
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   S_SETPC_B64 $sgpr30_sgpr31
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.1:
  ; CHECK-NEXT:   S_NOP 0
  bb.0:
    liveins: $sgpr30_sgpr31
    successors: %bb.1
    S_SETPC_B64 $sgpr30_sgpr31

  bb.1:
    S_NOP 0

...