[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / llvm / test / Transforms / lower-builtin-allow-check-remarks.ll
blob3422ab1b56d32aa7959b2e5acb328bb8ebf670a4
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 {
13 entry1:
14   %allow = call i1 @llvm.allow.runtime.check(metadata !"test_check")
15   ret i1 %allow
18 declare i1 @llvm.allow.runtime.check(metadata) nounwind
20 define i1 @test_ubsan() local_unnamed_addr {
21 entry2:
22   %allow = call i1 @llvm.allow.ubsan.check(i8 7)
23   ret i1 %allow