1; RUN: llc -mtriple=aarch64-linux %s               -o - | \
2; RUN:   FileCheck %s --check-prefix=ASM
3; RUN: llc -mtriple=aarch64-linux %s -filetype=obj -o - | \
4; RUN:   llvm-readelf --notes | FileCheck %s --check-prefix=OBJ
5
6define dso_local i32 @f() #0 {
7entry:
8  %r = tail call i32 @g()
9  ret i32 %r
10}
11
12declare dso_local i32 @g()
13
14attributes #0 = { "branch-target-enforcement" }
15
16; Declarations don't prevent setting BTI
17; ASM:	    .word	3221225472
18; ASM-NEXT:	.word	4
19; ASM-NEXT:	.word	1
20
21; OBJ: Properties: aarch64 feature: BTI
22