Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MachineVerifier / test_g_brjt_is_indirect_branch.mir
blobe5c4d41e1412b53dc95c41435962acc27318d61f
1 # RUN: llc -mtriple=riscv32 -o - -run-pass=none -verify-machineinstrs %s | FileCheck %s
2 # REQUIRES: riscv-registered-target
4 # This test checks that the G_BRJT is an indirect branch by leveraging RISCV's
5 # version of analyzeBranch. If G_BRJT would not be an indirect branch, this
6 # test would crash.
8 ---
9 name:            test_jump_table
10 legalized:       true
11 tracksRegLiveness: true
12 jumpTable:
13   kind:            block-address
14   entries:
15     - id:              0
16       blocks:          [ '%bb.0' ]
17 body:             |
18   bb.0:
19     liveins: $x0
20     %0:_(s32) = COPY $x0
21     %1:_(p0) = COPY $x0
23     ; CHECK-NOT: Branch instruction is missing a basic block operand or isIndirectBranch property
24     G_BRJT %1, %jump-table.0, %0
26 ...