102 lines · plain
1# RUN: llc -mcpu=cortex-m33 -run-pass=arm-pseudo %s -o - | FileCheck %s2--- |3 target datalayout = "E-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"4 target triple = "thumbebv8m.main-arm-none-eabi"5 6 ; Function Attrs: cmse_nonsecure_entry nounwind7 define hidden arm_aapcs_vfpcc void @secure_foo(ptr %fptr) local_unnamed_addr #0 {8 entry:9 %0 = ptrtoint ptr %fptr to i3210 %and = and i32 %0, -211 %1 = inttoptr i32 %and to ptr12 call arm_aapcs_vfpcc void %1(double 0.000000e+00, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00) #213 ret void14 }15 16 ; Function Attrs: nounwind17 declare void @llvm.stackprotector(ptr, ptr) #118 19 attributes #0 = { "cmse_nonsecure_entry" nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "denormal-fp-math"="preserve-sign" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="true" "no-jump-tables"="false" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+8msecext,+armv8-m.main,-d32,-fp64,+fp-armv8,+hwdiv,+thumb-mode,-crypto,-fullfp16,-neon" "use-soft-float"="false" }20 attributes #1 = { nounwind }21 attributes #2 = { "cmse_nonsecure_call" nounwind }22 23 !llvm.module.flags = !{!0, !1, !2, !3}24 25 !0 = !{i32 1, !"wchar_size", i32 4}26 !1 = !{i32 1, !"static_rwdata", i32 1}27 !2 = !{i32 1, !"enumsize_buildattr", i32 2}28 !3 = !{i32 1, !"armlib_unavailable", i32 0}29 30...31---32name: secure_foo33alignment: 234tracksRegLiveness: true35liveins:36 - { reg: '$r0' }37frameInfo:38 stackSize: 839 maxAlignment: 440 adjustsStack: true41 hasCalls: true42 maxCallFrameSize: 043stack:44 - { id: 0, type: spill-slot, offset: -4, size: 4, alignment: 4, stack-id: default,45 callee-saved-register: '$lr' }46 - { id: 1, type: spill-slot, offset: -8, size: 4, alignment: 4, stack-id: default,47 callee-saved-register: '$r7' }48constants:49 - id: 050 value: 'double 0.000000e+00'51 alignment: 852 - id: 153 value: 'double 1.000000e+00'54 alignment: 855 - id: 256 value: 'double 2.000000e+00'57 alignment: 858 - id: 359 value: 'double 3.000000e+00'60 alignment: 861 - id: 462 value: 'double 4.000000e+00'63 alignment: 864 - id: 565 value: 'double 5.000000e+00'66 alignment: 867 - id: 668 value: 'double 6.000000e+00'69 alignment: 870 - id: 771 value: 'double 7.000000e+00'72 alignment: 873body: |74 bb.0.entry:75 liveins: $r0, $r7, $lr76 77 $sp = frame-setup t2STMDB_UPD $sp, 14, $noreg, killed $r7, killed $lr78 frame-setup CFI_INSTRUCTION def_cfa_offset 879 frame-setup CFI_INSTRUCTION offset $lr, -480 frame-setup CFI_INSTRUCTION offset $r7, -881 renamable $d0 = VLDRD %const.0, 0, 14, $noreg :: (load (s64) from constant-pool)82 renamable $d1 = VLDRD %const.1, 0, 14, $noreg :: (load (s64) from constant-pool)83 renamable $d2 = VLDRD %const.2, 0, 14, $noreg :: (load (s64) from constant-pool)84 renamable $d3 = VLDRD %const.3, 0, 14, $noreg :: (load (s64) from constant-pool)85 renamable $d4 = VLDRD %const.4, 0, 14, $noreg :: (load (s64) from constant-pool)86 renamable $d5 = VLDRD %const.5, 0, 14, $noreg :: (load (s64) from constant-pool)87 renamable $d6 = VLDRD %const.6, 0, 14, $noreg :: (load (s64) from constant-pool)88 renamable $d7 = VLDRD %const.7, 0, 14, $noreg :: (load (s64) from constant-pool)89 renamable $r0 = t2BICri killed renamable $r0, 1, 14, $noreg, $noreg90 tBLXNS_CALL killed renamable $r0, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $d0, implicit $d1, implicit $d2, implicit $d3, implicit $d4, implicit $d5, implicit $d6, implicit $d7, implicit-def $sp91 $sp = t2LDMIA_UPD $sp, 14, $noreg, def $r7, def $lr92 tBXNS_RET93 94...95 96# CHECK: VLSTM97# CHECK-DAG: $s12 = VLDRS $sp, 12, 14 /* CC::al */, $noreg98# CHECK-DAG: $s13 = VLDRS $sp, 13, 14 /* CC::al */, $noreg99# CHECK-DAG: $s14 = VLDRS $sp, 14, 14 /* CC::al */, $noreg100# CHECK-DAG: $s15 = VLDRS $sp, 15, 14 /* CC::al */, $noreg101# CHECK: tBLXNSr102