1# RUN: not --crash llc -march=amdgcn -run-pass=verify -o - %s 2>&1 | FileCheck %s
2# REQUIRES: amdgpu-registered-target
3
4# Make sure that mismatched successors are caught when a _term
5# instruction is used
6
7# CHECK: *** Bad machine code: MBB exits via jump or conditional branch, but its target isn't a CFG successor! ***
8# CHECK: *** Bad machine code: MBB has unexpected successors which are not branch targets, fallthrough, EHPads, or inlineasm_br targets. ***
9
10---
11name: verifier_pseudo_terminators
12body:             |
13  bb.0:
14    successors: %bb.1
15
16    %0:sreg_64 = S_XOR_B64_term undef %1:sreg_64, undef %2:sreg_64, implicit-def $scc
17    $exec = S_MOV_B64_term %0
18    S_BRANCH %bb.2
19
20  bb.1:
21    S_SETPC_B64_return undef $sgpr30_sgpr31
22
23  bb.2:
24    S_SETPC_B64_return undef $sgpr30_sgpr31
25
26...
27