xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/unreachableblockelim.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1; RUN: opt -S < %s -unreachableblockelim | FileCheck %s
2; RUN: opt -S < %s -passes=unreachableblockelim | FileCheck %s
3
4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5target triple = "x86_64-unknown-linux-gnu"
6
7declare void @abort()
8
9; CHECK-LABEL: @foo(
10; CHECK-NOT return:
11define void @foo(i32* %p) {
12entry:
13  %p.addr = alloca i32*, align 8
14  call void @abort()
15  unreachable
16
17return:                                           ; No predecessors!
18  store i32* %p, i32** %p.addr, align 8
19  ret void
20}
21
22