1 ; RUN: llc %s -mtriple=mipsel -mcpu=mips32r2 -mattr=micromips -filetype=asm \
2 ; RUN: -relocation-model=static -o - | FileCheck %s
4 define i32 @sum(i32 %a, i32 %b) nounwind uwtable {
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
16 define i32 @main() nounwind uwtable {
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
34 ; CHECK: .type sum,@function
35 ; CHECK: .set micromips
41 ; CHECK: .type main,@function
42 ; CHECK: .set micromips