24 lines · plain
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 %s2 3; Given both Arm and Thumb functions in the same compilation unit, we should4; get both arm and thumb thunks.5 6define i32 @test1(i32 %a, i32 %b) {7 ret i32 %a8}9 10define i32 @test2(i32 %a, i32 %b) "target-features"="+thumb-mode" {11 ret i32 %a12}13 14; CHECK: define i32 @test1(i32 %a, i32 %b) #015; CHECK: define i32 @test2(i32 %a, i32 %b) #116; CHECK: define linkonce_odr hidden void @__llvm_slsblr_thunk_arm_sp() #2 comdat17; CHECK: define linkonce_odr hidden void @__llvm_slsblr_thunk_thumb_sp() #3 comdat18 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" }23 24