1 ; RUN: llc -mattr=harden-sls-retbr -mattr=harden-sls-blr -verify-machineinstrs -mtriple=armv8-linux-gnueabi -stop-after=arm-sls-hardening %s -o - | FileCheck %s
3 ; Given both Arm and Thumb functions in the same compilation unit, we should
4 ; get both arm and thumb thunks.
6 define i32 @test1(i32 %a, i32 %b) {
10 define i32 @test2(i32 %a, i32 %b) "target-features"="+thumb-mode" {
14 ; CHECK: define i32 @test1(i32 %a, i32 %b) #0
15 ; CHECK: define i32 @test2(i32 %a, i32 %b) #1
16 ; CHECK: define linkonce_odr hidden void @__llvm_slsblr_thunk_arm_sp() #2 comdat
17 ; CHECK: define linkonce_odr hidden void @__llvm_slsblr_thunk_thumb_sp() #3 comdat
19 ; CHECK: attributes #0 = { "target-features"="+harden-sls-retbr,+harden-sls-blr" }
20 ; CHECK: attributes #1 = { "target-features"="+thumb-mode,+harden-sls-retbr,+harden-sls-blr" }
21 ; CHECK: attributes #2 = { naked nounwind }
22 ; CHECK: attributes #3 = { naked nounwind "target-features"="+thumb-mode" }