File: auto_upgrade_ptrauth.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (53 lines) | stat: -rw-r--r-- 1,987 bytes parent folder | download
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
; Autoupgrade i64 overloaded @llvm.ptrauth intrinsics to non-overloaded ones.

; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s

declare i64 @llvm.ptrauth.auth.i64(i64, i32, i64)
declare i64 @llvm.ptrauth.sign.i64(i64, i32, i64)
declare i64 @llvm.ptrauth.sign.generic.i64(i64, i64)
declare i64 @llvm.ptrauth.resign.i64(i64, i32, i64, i32, i64)
declare i64 @llvm.ptrauth.strip.i64(i64, i32)
declare i64 @llvm.ptrauth.blend.i64(i64, i64)

; CHECK-LABEL: @test_auth(
define i64 @test_auth(i64 %a0, i64 %a1) {
  %tmp0 = call i64 @llvm.ptrauth.auth.i64(i64 %a0, i32 0, i64 %a1)
  ; CHECK: %tmp0 = call i64 @llvm.ptrauth.auth(i64 %a0, i32 0, i64 %a1)
  ret i64 %tmp0
}

; CHECK-LABEL: @test_sign(
define i64 @test_sign(i64 %a0, i64 %a1) {
  %tmp0 = call i64 @llvm.ptrauth.sign.i64(i64 %a0, i32 0, i64 %a1)
  ; CHECK: %tmp0 = call i64 @llvm.ptrauth.sign(i64 %a0, i32 0, i64 %a1)
  ret i64 %tmp0
}

; CHECK-LABEL: @test_strip(
define i64 @test_strip(i64 %a0) {
  %tmp0 = call i64 @llvm.ptrauth.strip.i64(i64 %a0, i32 0)
  ; CHECK: %tmp0 = call i64 @llvm.ptrauth.strip(i64 %a0, i32 0)
  ret i64 %tmp0
}

; CHECK-LABEL: @test_blend(
define i64 @test_blend(i64 %a0, i64 %a1) {
  %tmp0 = call i64 @llvm.ptrauth.blend.i64(i64 %a0, i64 %a1)
  ; CHECK: %tmp0 = call i64 @llvm.ptrauth.blend(i64 %a0, i64 %a1)
  ret i64 %tmp0
}

; CHECK-LABEL: @test_resign(
define i64 @test_resign(i64 %a0, i64 %a1, i64 %a2) {
  %tmp0 = call i64 @llvm.ptrauth.resign.i64(i64 %a0, i32 0, i64 %a1, i32 0, i64 %a2)
  ; CHECK: %tmp0 = call i64 @llvm.ptrauth.resign(i64 %a0, i32 0, i64 %a1, i32 0, i64 %a2)
  ret i64 %tmp0
}

; CHECK: declare i64 @llvm.ptrauth.auth(i64, i32 immarg, i64)
; CHECK: declare i64 @llvm.ptrauth.sign(i64, i32 immarg, i64)
; CHECK: declare i64 @llvm.ptrauth.sign.generic(i64, i64)
; CHECK: declare i64 @llvm.ptrauth.resign(i64, i32 immarg, i64, i32 immarg, i64)
; CHECK: declare i64 @llvm.ptrauth.strip(i64, i32 immarg)
; CHECK: declare i64 @llvm.ptrauth.blend(i64, i64)