forked from rust-lang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][PAC] Expand blend(reg, imm) operation in aarch64-pauth pass (…
…llvm#74729) In preparation for implementing code generation for more @llvm.ptrauth.* intrinsics, move the expansion of blend(register, small integer) variant of @llvm.ptrauth.blend to the AArch64PointerAuth pass, where most other PAuth-related code generation takes place.
- Loading branch information
1 parent
aaaff74
commit 08fccf8
Showing
3 changed files
with
68 additions
and
3 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,27 @@ | ||
# RUN: llc -mtriple=aarch64--- -run-pass=aarch64-ptrauth -verify-machineinstrs %s -o - | FileCheck %s | ||
|
||
# Test the corner cases that cannot be reliably tested using LLVM IR as input. | ||
|
||
--- | | ||
define i64 @blend_untied(i64 %unused, i64 %ptr_arg) { | ||
ret i64 0 | ||
} | ||
... | ||
--- | ||
# Check that the input register is copied to the output one, if not tied. | ||
|
||
name: blend_untied | ||
tracksRegLiveness: true | ||
body: | | ||
bb.0: | ||
liveins: $lr, $x0, $x1 | ||
$x0 = PAUTH_BLEND $x1, 42 | ||
RET undef $lr | ||
# CHECK: liveins: $lr, $x0, $x1 | ||
# CHECK-NEXT: {{^ +$}} | ||
# CHECK-NEXT: $x0 = ORRXrs $xzr, $x1, 0 | ||
# CHECK-NEXT: $x0 = MOVKXi $x0, 42, 48 | ||
# CHECK-NEXT: RET undef $lr | ||
|
||
... |