1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple arm64e-apple-darwin -verify-machineinstrs -global-isel=0 | FileCheck %s
3 ; RUN: llc < %s -mtriple arm64e-apple-darwin -verify-machineinstrs -global-isel=1 -global-isel-abort=1 | FileCheck %s
4 ; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs -global-isel=0 | FileCheck %s
5 ; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs -global-isel=1 -global-isel-abort=1 | FileCheck %s
7 define i64 @test_sign_ia(i64 %arg, i64 %arg1) {
8 ; CHECK-LABEL: test_sign_ia:
10 ; CHECK-NEXT: pacia x0, x1
12 %tmp = call i64 @llvm.ptrauth.sign(i64 %arg, i32 0, i64 %arg1)
16 define i64 @test_sign_ia_zero(i64 %arg) {
17 ; CHECK-LABEL: test_sign_ia_zero:
19 ; CHECK-NEXT: paciza x0
21 %tmp = call i64 @llvm.ptrauth.sign(i64 %arg, i32 0, i64 0)
25 define i64 @test_sign_ib(i64 %arg, i64 %arg1) {
26 ; CHECK-LABEL: test_sign_ib:
28 ; CHECK-NEXT: pacib x0, x1
30 %tmp = call i64 @llvm.ptrauth.sign(i64 %arg, i32 1, i64 %arg1)
34 define i64 @test_sign_ib_zero(i64 %arg) {
35 ; CHECK-LABEL: test_sign_ib_zero:
37 ; CHECK-NEXT: pacizb x0
39 %tmp = call i64 @llvm.ptrauth.sign(i64 %arg, i32 1, i64 0)
43 define i64 @test_sign_da(i64 %arg, i64 %arg1) {
44 ; CHECK-LABEL: test_sign_da:
46 ; CHECK-NEXT: pacda x0, x1
48 %tmp = call i64 @llvm.ptrauth.sign(i64 %arg, i32 2, i64 %arg1)
52 define i64 @test_sign_da_zero(i64 %arg) {
53 ; CHECK-LABEL: test_sign_da_zero:
55 ; CHECK-NEXT: pacdza x0
57 %tmp = call i64 @llvm.ptrauth.sign(i64 %arg, i32 2, i64 0)
61 define i64 @test_sign_db(i64 %arg, i64 %arg1) {
62 ; CHECK-LABEL: test_sign_db:
64 ; CHECK-NEXT: pacdb x0, x1
66 %tmp = call i64 @llvm.ptrauth.sign(i64 %arg, i32 3, i64 %arg1)
70 define i64 @test_sign_db_zero(i64 %arg) {
71 ; CHECK-LABEL: test_sign_db_zero:
73 ; CHECK-NEXT: pacdzb x0
75 %tmp = call i64 @llvm.ptrauth.sign(i64 %arg, i32 3, i64 0)
79 declare i64 @llvm.ptrauth.sign(i64, i32, i64)