brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 1145b90 Raw
51 lines · plain
1; RUN: llc -mtriple=armv7a-eabi < %s | FileCheck %s --check-prefix=CHECK-ARM2; RUN: llc -mtriple=armv6m-eabi < %s | FileCheck %s --check-prefix=CHECK-THM3 4; Function Attrs: minsize optsize5declare void @g(ptr) local_unnamed_addr #06 7; Function Attrs: minsize optsize8define void @f() local_unnamed_addr #0 {9entry:10  %i = alloca i32, align 411  store i32 1, ptr %i, align 412  call void @g(ptr nonnull %i)13  ret void14}15 16; Check unwind info does not mention the registers used for padding, and17; the amount of stack adjustment is the same as in the actual18; instructions.19 20; CHECK-ARM:      .save {r11, lr}21; CHECK-ARM-NEXT: .pad #822; CHECK-ARM-NEXT: push {r9, r10, r11, lr}23; CHECK-ARM:      pop {r2, r3, r11, pc}24 25; CHECK-THM:      .save {r7, lr}26; CHECK-THM-NEXT: .pad #827; CHECK-THM-NEXT: push {r5, r6, r7, lr}28; CHECK-THM:      pop {r2, r3, r7, pc}29 30 31define void @f1() local_unnamed_addr #1 {32entry:33  %i = alloca i32, align 434  store i32 1, ptr %i, align 435  call void @g(ptr nonnull %i)36  ret void37}38 39; Check that unwind info is the same whether or not using -Os (minsize attr)40 41; CHECK-ARM:      .save {r11, lr}42; CHECK-ARM-NEXT: push {r11, lr}43; CHECK-ARM-NEXT: .pad #844 45; CHECK-THM:      .save {r7, lr}46; CHECK-THM-NEXT: push {r7, lr}47; CHECK-THM-NEXT: .pad #848 49attributes #0 = { minsize optsize }50attributes #1 = { optsize }51