aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/Generic/allow-check.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Generic/allow-check.ll')
-rw-r--r--llvm/test/CodeGen/Generic/allow-check.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/allow-check.ll b/llvm/test/CodeGen/Generic/allow-check.ll
new file mode 100644
index 0000000..88412f5
--- /dev/null
+++ b/llvm/test/CodeGen/Generic/allow-check.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s -O3
+; RUN: llc < %s -O3 -global-isel
+; RUN: llc < %s -O3 -fast-isel
+
+; RUN: llc < %s -O0
+; RUN: llc < %s -O0 -global-isel
+; RUN: llc < %s -O0 -fast-isel
+
+define i1 @test_runtime() local_unnamed_addr {
+entry:
+ %allow = call i1 @llvm.allow.runtime.check(metadata !"test_check")
+ ret i1 %allow
+}
+
+declare i1 @llvm.allow.runtime.check(metadata) nounwind
+
+define i1 @test_ubsan() local_unnamed_addr {
+entry:
+ %allow = call i1 @llvm.allow.ubsan.check(i8 7)
+ ret i1 %allow
+}
+
+declare i1 @llvm.allow.ubsan.check(i8) nounwind