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
5 define i64 @test_blend(i64 %arg, i64 %arg1) {
6 ; CHECK-LABEL: test_blend:
8 ; CHECK-NEXT: bfi x0, x1, #48, #16
10 %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 %arg1)
14 define i64 @test_blend_constant(i64 %arg) {
15 ; CHECK-LABEL: test_blend_constant:
17 ; CHECK-NEXT: movk x0, #12345, lsl #48
19 %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 12345)
23 ; Blend isn't commutative.
24 define i64 @test_blend_constant_swapped(i64 %arg) {
25 ; CHECK-LABEL: test_blend_constant_swapped:
27 ; CHECK-NEXT: mov w8, #12345
28 ; CHECK-NEXT: bfi x8, x0, #48, #16
29 ; CHECK-NEXT: mov x0, x8
31 %tmp = call i64 @llvm.ptrauth.blend(i64 12345, i64 %arg)
35 ; Blends of constants wider than 16 bits truncate the constant.
36 define i64 @test_blend_constant_wide(i64 %arg) {
37 ; CHECK-LABEL: test_blend_constant_wide:
39 ; CHECK-NEXT: mov w8, #65536
40 ; CHECK-NEXT: bfi x0, x8, #48, #16
42 %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 65536)
46 declare i64 @llvm.ptrauth.blend(i64, i64)