42 lines · plain
1;; This file contains the previous semantic of the branch-target-enforcement, sign-return-address.2;; Used for test mixing a mixed link case and also verify the import too in llc.3 4; RUN: llc -mattr=+pauth -mattr=+bti %s -o - | FileCheck %s5 6target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"7target triple = "aarch64-unknown-linux-gnu"8 9declare void @func()10 11define i32 @fiz_on() #0 {12entry:13 call void @func()14 ret i32 4215}16 17; CHECK-LABEL: fiz_on:18; CHECK: paciasp19; CHECK: bl func20; CHECK: retaa21 22define i32 @fiz_off() #1 {23entry:24 ret i32 4325}26 27; CHECK-LABEL: fiz_off:28; CHECK-NOT: pac29; CHECK-NOT: hint30; CHECK-NOT: bti31; CHECK: ret32 33attributes #0 = { noinline nounwind optnone uwtable }34attributes #1 = { noinline nounwind optnone uwtable "branch-target-enforcement"="false" "sign-return-address"="none" }35 36!llvm.module.flags = !{!0, !1, !2, !3}37 38!0 = !{i32 8, !"branch-target-enforcement", i32 1}39!1 = !{i32 8, !"sign-return-address", i32 1}40!2 = !{i32 8, !"sign-return-address-all", i32 0}41!3 = !{i32 8, !"sign-return-address-with-bkey", i32 0}42