1 ; RUN: opt < %s -passes='require<profile-summary>,function(lower-allow-check)' -lower-allow-check-random-rate=1 -pass-remarks=lower-allow-check -pass-remarks-missed=lower-allow-check -S 2>&1 | FileCheck %s
2 ; RUN: opt < %s -passes='require<profile-summary>,function(lower-allow-check)' -lower-allow-check-random-rate=0 -pass-remarks=lower-allow-check -pass-remarks-missed=lower-allow-check -S 2>&1 | FileCheck %s --check-prefixes=REMOVE
4 ; CHECK: remark: <unknown>:0:0: Allowed check: Kind=test_check F=test_runtime BB=entry1
5 ; CHECK: remark: <unknown>:0:0: Allowed check: Kind=7 F=test_ubsan BB=entry2
7 ; REMOVE: remark: <unknown>:0:0: Removed check: Kind=test_check F=test_runtime BB=entry1
8 ; REMOVE: remark: <unknown>:0:0: Removed check: Kind=7 F=test_ubsan BB=entry2
10 target triple = "x86_64-pc-linux-gnu"
12 define i1 @test_runtime() local_unnamed_addr {
14 %allow = call i1 @llvm.allow.runtime.check(metadata !"test_check")
18 declare i1 @llvm.allow.runtime.check(metadata) nounwind
20 define i1 @test_ubsan() local_unnamed_addr {
22 %allow = call i1 @llvm.allow.ubsan.check(i8 7)