xref: /llvm-project/llvm/test/CodeGen/Mips/insn-zero-size-bb.ll (revision cfc1a8787829623ad7427bb7e71f380f6d241262)
1; RUN: llc < %s -mtriple=mips -mcpu=mips32 | FileCheck %s
2; RUN: llc < %s -mtriple=mips -mcpu=mips32r3 -mattr=+micromips | FileCheck %s
3; RUN: llc < %s -mtriple=mips -mattr=mips16 | FileCheck %s
4
5; Verify that we emit the .insn directive for zero-sized (empty) basic blocks.
6; This only really matters for microMIPS and MIPS16.
7
8declare i32 @foo(...)
9declare void @bar()
10
11define void @main() personality ptr @foo {
12entry:
13  invoke void @bar() #0
14          to label %unreachable unwind label %return
15
16unreachable:
17; CHECK:          {{.*}}: # %unreachable
18; CHECK-NEXT:         .insn
19  unreachable
20
21return:
22  %0 = landingpad { ptr, i32 }
23          catch ptr null
24  ret void
25}
26
27attributes #0 = { noreturn }
28