brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 2dc8a4c Raw
49 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple arm64e-apple-darwin             -verify-machineinstrs -global-isel=0 | FileCheck %s3; RUN: llc < %s -mtriple arm64e-apple-darwin             -verify-machineinstrs -global-isel=1 -global-isel-abort=1 | FileCheck %s4; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs -global-isel=0 | FileCheck %s5; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs -global-isel=1 -global-isel-abort=1 | FileCheck %s6 7define i64 @test_blend(i64 %arg, i64 %arg1) {8; CHECK-LABEL: test_blend:9; CHECK:       %bb.0:10; CHECK-NEXT:    bfi x0, x1, #48, #1611; CHECK-NEXT:    ret12  %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 %arg1)13  ret i64 %tmp14}15 16define i64 @test_blend_constant(i64 %arg) {17; CHECK-LABEL: test_blend_constant:18; CHECK:       %bb.0:19; CHECK-NEXT:    movk x0, #12345, lsl #4820; CHECK-NEXT:    ret21  %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 12345)22  ret i64 %tmp23}24 25; Blend isn't commutative.26define i64 @test_blend_constant_swapped(i64 %arg) {27; CHECK-LABEL: test_blend_constant_swapped:28; CHECK:       %bb.0:29; CHECK-NEXT:    mov w8, #1234530; CHECK-NEXT:    bfi x8, x0, #48, #1631; CHECK-NEXT:    mov x0, x832; CHECK-NEXT:    ret33  %tmp = call i64 @llvm.ptrauth.blend(i64 12345, i64 %arg)34  ret i64 %tmp35}36 37; Blends of constants wider than 16 bits truncate the constant.38define i64 @test_blend_constant_wide(i64 %arg) {39; CHECK-LABEL: test_blend_constant_wide:40; CHECK:       %bb.0:41; CHECK-NEXT:    mov w8, #6553642; CHECK-NEXT:    bfi x0, x8, #48, #1643; CHECK-NEXT:    ret44  %tmp = call i64 @llvm.ptrauth.blend(i64 %arg, i64 65536)45  ret i64 %tmp46}47 48declare i64 @llvm.ptrauth.blend(i64, i64)49