| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py |
| ; RUN: opt -S -passes=simplifycfg %s | FileCheck %s |
| |
| define void @call_null_as0() { |
| ; CHECK-LABEL: @call_null_as0( |
| ; CHECK-NEXT: unreachable |
| ; |
| call addrspace(0) void null() |
| ret void |
| } |
| |
| define void @call_null_as0_null_pointer_defined() null_pointer_is_valid { |
| ; CHECK-LABEL: @call_null_as0_null_pointer_defined( |
| ; CHECK-NEXT: call void null() |
| ; CHECK-NEXT: ret void |
| ; |
| call addrspace(0) void null() |
| ret void |
| } |
| |
| define void @call_null_as1() { |
| ; CHECK-LABEL: @call_null_as1( |
| ; CHECK-NEXT: call addrspace(1) void null() |
| ; CHECK-NEXT: ret void |
| ; |
| call addrspace(1) void null() |
| ret void |
| } |
| |
| define void @call_poison_as0() { |
| ; CHECK-LABEL: @call_poison_as0( |
| ; CHECK-NEXT: unreachable |
| ; |
| call addrspace(0) void poison() |
| ret void |
| } |
| |
| define void @call_poison_as0_poison_pointer_defined() null_pointer_is_valid { |
| ; CHECK-LABEL: @call_poison_as0_poison_pointer_defined( |
| ; CHECK-NEXT: unreachable |
| ; |
| call addrspace(0) void poison() |
| ret void |
| } |
| |
| define void @call_poison_as1() { |
| ; CHECK-LABEL: @call_poison_as1( |
| ; CHECK-NEXT: unreachable |
| ; |
| call addrspace(1) void poison() |
| ret void |
| } |