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_blend(i64 %arg, i64 %arg1) {
8 ; CHECK-LABEL: test_blend:
10 ; CHECK-NEXT: bfi x0, x1, #48, #16
12 %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 %arg1)
16 define i64 @test_blend_constant(i64 %arg) {
17 ; CHECK-LABEL: test_blend_constant:
19 ; CHECK-NEXT: movk x0, #12345, lsl #48
21 %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 12345)
25 ; Blend isn't commutative.
26 define i64 @test_blend_constant_swapped(i64 %arg) {
27 ; CHECK-LABEL: test_blend_constant_swapped:
29 ; CHECK-NEXT: mov w8, #12345
30 ; CHECK-NEXT: bfi x8, x0, #48, #16
31 ; CHECK-NEXT: mov x0, x8
33 %tmp = call i64 @llvm.ptrauth.blend(i64 12345, i64 %arg)
37 ; Blends of constants wider than 16 bits truncate the constant.
38 define i64 @test_blend_constant_wide(i64 %arg) {
39 ; CHECK-LABEL: test_blend_constant_wide:
41 ; CHECK-NEXT: mov w8, #65536
42 ; CHECK-NEXT: bfi x0, x8, #48, #16
44 %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 65536)
48 declare i64 @llvm.ptrauth.blend(i64, i64)