aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/allow-check.ll
blob: 3f0bb1837b22aa741903d1f6a997955cb1c12404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
; RUN: llc < %s -mtriple=x86_64 | FileCheck %s
; RUN: llc < %s -mtriple=x86_64 -global-isel | FileCheck %s
; RUN: llc < %s -mtriple=x86_64 -fast-isel | FileCheck %s

define i1 @test_runtime() local_unnamed_addr {
; CHECK-LABEL: test_runtime:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    movb $1, %al
; CHECK-NEXT:    retq
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 {
; CHECK-LABEL: test_ubsan:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    movb $1, %al
; CHECK-NEXT:    retq
entry:
  %allow = call i1 @llvm.allow.ubsan.check(i8 7)
  ret i1 %allow
}

declare i1 @llvm.allow.ubsan.check(i8) nounwind