1; RUN: llc %s -march=mipsel -mcpu=mips32r2 -mattr=micromips -filetype=asm \ 2; RUN: -relocation-model=static -o - | FileCheck %s 3 4define i32 @sum(i32 %a, i32 %b) nounwind uwtable { 5entry: 6 %a.addr = alloca i32, align 4 7 %b.addr = alloca i32, align 4 8 store i32 %a, i32* %a.addr, align 4 9 store i32 %b, i32* %b.addr, align 4 10 %0 = load i32, i32* %a.addr, align 4 11 %1 = load i32, i32* %b.addr, align 4 12 %add = add nsw i32 %0, %1 13 ret i32 %add 14} 15 16define i32 @main() nounwind uwtable { 17entry: 18 %retval = alloca i32, align 4 19 %x = alloca i32, align 4 20 %y = alloca i32, align 4 21 %z = alloca i32, align 4 22 store i32 0, i32* %retval 23 %0 = load i32, i32* %y, align 4 24 %1 = load i32, i32* %z, align 4 25 %call = call i32 @sum(i32 %0, i32 %1) 26 store i32 %call, i32* %x, align 4 27 %2 = load i32, i32* %x, align 4 28 ret i32 %2 29} 30 31; CHECK: .text 32 33; CHECK: .globl sum 34; CHECK: .type sum,@function 35; CHECK: .set micromips 36; CHECK: .ent sum 37; CHECK-LABEL: sum: 38; CHECK: .end sum 39 40; CHECK: .globl main 41; CHECK: .type main,@function 42; CHECK: .set micromips 43; CHECK: .ent main 44; CHECK-LABEL: main: 45 46; CHECK: jal sum 47 48; CHECK: .end main 49