104 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -S < %s | FileCheck %s3; RUN: llvm-as < %s | llvm-dis | FileCheck %s4 5define void @test_none(ptr captures(none) %p) {6; CHECK-LABEL: define void @test_none(7; CHECK-SAME: ptr captures(none) [[P:%.*]]) {8; CHECK-NEXT: ret void9;10 ret void11}12 13define void @test_address(ptr captures(address) %p) {14; CHECK-LABEL: define void @test_address(15; CHECK-SAME: ptr captures(address) [[P:%.*]]) {16; CHECK-NEXT: ret void17;18 ret void19}20 21define void @test_address_is_null(ptr captures(address_is_null) %p) {22; CHECK-LABEL: define void @test_address_is_null(23; CHECK-SAME: ptr captures(address_is_null) [[P:%.*]]) {24; CHECK-NEXT: ret void25;26 ret void27}28 29define void @test_address_provenance(ptr captures(address, provenance) %p) {30; CHECK-LABEL: define void @test_address_provenance(31; CHECK-SAME: ptr captures(address, provenance) [[P:%.*]]) {32; CHECK-NEXT: ret void33;34 ret void35}36 37define void @test_address_read_provenance(ptr captures(address, read_provenance) %p) {38; CHECK-LABEL: define void @test_address_read_provenance(39; CHECK-SAME: ptr captures(address, read_provenance) [[P:%.*]]) {40; CHECK-NEXT: ret void41;42 ret void43}44 45define void @test_ret(ptr captures(ret: address, provenance) %p) {46; CHECK-LABEL: define void @test_ret(47; CHECK-SAME: ptr captures(ret: address, provenance) [[P:%.*]]) {48; CHECK-NEXT: ret void49;50 ret void51}52 53define void @test_address_is_null_and_ret(ptr captures(address_is_null, ret: address, provenance) %p) {54; CHECK-LABEL: define void @test_address_is_null_and_ret(55; CHECK-SAME: ptr captures(address_is_null, ret: address, provenance) [[P:%.*]]) {56; CHECK-NEXT: ret void57;58 ret void59}60 61define void @test_address_and_ret_none(ptr captures(address, ret: none) %p) {62; CHECK-LABEL: define void @test_address_and_ret_none(63; CHECK-SAME: ptr captures(address, ret: none) [[P:%.*]]) {64; CHECK-NEXT: ret void65;66 ret void67}68 69; Duplicates callpse into one.70define void @test_duplicate(ptr captures(address, address) %p) {71; CHECK-LABEL: define void @test_duplicate(72; CHECK-SAME: ptr captures(address) [[P:%.*]]) {73; CHECK-NEXT: ret void74;75 ret void76}77 78; read_provenance is a subset of provenance.79define void @test_duplicate_read_provenance(ptr captures(read_provenance, provenance) %p) {80; CHECK-LABEL: define void @test_duplicate_read_provenance(81; CHECK-SAME: ptr captures(provenance) [[P:%.*]]) {82; CHECK-NEXT: ret void83;84 ret void85}86 87; address_is_null is a subset of address.88define void @test_duplicate_address_is_null(ptr captures(address_is_null, address) %p) {89; CHECK-LABEL: define void @test_duplicate_address_is_null(90; CHECK-SAME: ptr captures(address) [[P:%.*]]) {91; CHECK-NEXT: ret void92;93 ret void94}95 96; Return-only none is same as plain none.97define void @test_ret_none(ptr captures(ret: none) %p) {98; CHECK-LABEL: define void @test_ret_none(99; CHECK-SAME: ptr captures(none) [[P:%.*]]) {100; CHECK-NEXT: ret void101;102 ret void103}104