Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][PAC] Select XPAC for ptrauth.strip intrinsic.
Differential Revision: https://reviews.llvm.org/D132385
- Loading branch information
1 parent
5b70001
commit 718bb22
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc < %s -mtriple arm64e-apple-darwin -verify-machineinstrs -global-isel=0 | FileCheck %s | ||
; RUN: llc < %s -mtriple arm64e-apple-darwin -verify-machineinstrs -global-isel=1 -global-isel-abort=1 | FileCheck %s | ||
|
||
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" | ||
|
||
define i64 @test_strip_ia(i64 %arg) { | ||
; CHECK-LABEL: test_strip_ia: | ||
; CHECK: ; %bb.0: | ||
; CHECK-NEXT: xpaci x0 | ||
; CHECK-NEXT: ret | ||
%tmp = call i64 @llvm.ptrauth.strip(i64 %arg, i32 0) | ||
ret i64 %tmp | ||
} | ||
|
||
define i64 @test_strip_ib(i64 %arg) { | ||
; CHECK-LABEL: test_strip_ib: | ||
; CHECK: ; %bb.0: | ||
; CHECK-NEXT: xpaci x0 | ||
; CHECK-NEXT: ret | ||
%tmp = call i64 @llvm.ptrauth.strip(i64 %arg, i32 1) | ||
ret i64 %tmp | ||
} | ||
|
||
define i64 @test_strip_da(i64 %arg) { | ||
; CHECK-LABEL: test_strip_da: | ||
; CHECK: ; %bb.0: | ||
; CHECK-NEXT: xpacd x0 | ||
; CHECK-NEXT: ret | ||
%tmp = call i64 @llvm.ptrauth.strip(i64 %arg, i32 2) | ||
ret i64 %tmp | ||
} | ||
|
||
define i64 @test_strip_db(i64 %arg) { | ||
; CHECK-LABEL: test_strip_db: | ||
; CHECK: ; %bb.0: | ||
; CHECK-NEXT: xpacd x0 | ||
; CHECK-NEXT: ret | ||
%tmp = call i64 @llvm.ptrauth.strip(i64 %arg, i32 3) | ||
ret i64 %tmp | ||
} | ||
|
||
declare i64 @llvm.ptrauth.strip(i64, i32) |