brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 34f0572 Raw
62 lines · plain
1# This test checks that inlining functions with the pauth-lr variants of2# fused pointer-auth-and-return instructions is properly handled by BOLT.3 4# REQUIRES: system-linux5 6# RUN: %clang %cflags -march=armv9.5-a+pauth-lr -O0 %s -o %t.exe -Wl,-q7# RUN: llvm-bolt --inline-all --print-inline  --print-only=_Z3barP1A  \8# RUN: %t.exe -o %t.bolt  | FileCheck %s9 10# CHECK: BOLT-INFO: inlined 0 calls at 2 call sites in 2 iteration(s). Change in binary size: 16 bytes.11# CHECK: Binary Function "_Z3barP1A" after inlining {12# CHECK-NOT:  bl	_Z3fooP1A13# CHECK:      paciasppc14# CHECK-NEXT: ldr	x8, [x0]15# CHECK-NEXT: ldr	w0, [x8]16# CHECK-NEXT: autiasppcr x2817# CHECK-NEXT: paciasppc18# CHECK-NEXT: ldr	x7, [x0]19# CHECK-NEXT: ldr	w0, [x7]20# CHECK-NEXT: autiasppc _Z3bazP1A21 22	.text23	.globl	_Z3fooP1A24	.type	_Z3fooP1A,@function25_Z3fooP1A:26    paciasppc27	ldr	x8, [x0]28	ldr	w0, [x8]29	retaasppcr x2830	.size	_Z3fooP1A, .-_Z3fooP1A31 32	.text33	.globl	_Z3bazP1A34	.type	_Z3bazP1A,@function35_Z3bazP1A:360:37    paciasppc38	ldr	x7, [x0]39	ldr	w0, [x7]40	retaasppc 0b41	.size	_Z3bazP1A, .-_Z3bazP1A42 43	.globl	_Z3barP1A44	.type	_Z3barP1A,@function45_Z3barP1A:46	stp	x29, x30, [sp, #-16]!47	mov	x29, sp48	bl	_Z3fooP1A49	bl	_Z3bazP1A50	mul	w0, w0, w051	ldp	x29, x30, [sp], #1652	ret53	.size	_Z3barP1A, .-_Z3barP1A54 55	.globl	main56	.p2align	257	.type	main,@function58main:59	mov	w0, wzr60	ret61	.size	main, .-main62