1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=simplifycfg %s | FileCheck %s
4 define void @call_null_as0() {
5 ; CHECK-LABEL: @call_null_as0(
6 ; CHECK-NEXT: unreachable
8 call addrspace(0) void null()
12 define void @call_null_as0_null_pointer_defined() null_pointer_is_valid {
13 ; CHECK-LABEL: @call_null_as0_null_pointer_defined(
14 ; CHECK-NEXT: call void null()
15 ; CHECK-NEXT: ret void
17 call addrspace(0) void null()
21 define void @call_null_as1() {
22 ; CHECK-LABEL: @call_null_as1(
23 ; CHECK-NEXT: call addrspace(1) void null()
24 ; CHECK-NEXT: ret void
26 call addrspace(1) void null()
30 define void @call_poison_as0() {
31 ; CHECK-LABEL: @call_poison_as0(
32 ; CHECK-NEXT: unreachable
34 call addrspace(0) void poison()
38 define void @call_poison_as0_poison_pointer_defined() null_pointer_is_valid {
39 ; CHECK-LABEL: @call_poison_as0_poison_pointer_defined(
40 ; CHECK-NEXT: unreachable
42 call addrspace(0) void poison()
46 define void @call_poison_as1() {
47 ; CHECK-LABEL: @call_poison_as1(
48 ; CHECK-NEXT: unreachable
50 call addrspace(1) void poison()