blob: 53036612ff652648ec642029061041f079ebea33 [file] [log] [blame]
Reed Kotler5bde5c32013-12-11 03:32:44 +00001; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=NEG
2
3; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -relocation-model=static < %s | FileCheck %s
4
5@f = common global float 0.000000e+00, align 4
6
7; Function Attrs: nounwind
8define void @foo1() #0 {
9entry:
10 %c = alloca [10 x i8], align 1
11 %arraydecay = getelementptr inbounds [10 x i8]* %c, i32 0, i32 0
12 call void @x(i8* %arraydecay)
13 %arraydecay1 = getelementptr inbounds [10 x i8]* %c, i32 0, i32 0
14 call void @x(i8* %arraydecay1)
15 ret void
16; CHECK: .ent foo1
17; CHECK: save $ra, $16, $17, [[FS:[0-9]+]] # 16 bit inst
18; CHECK: restore $ra, $16, $17, [[FS]]
19; CHECK: .end foo1
20}
21
22declare void @x(i8*) #1
23
24; Function Attrs: nounwind
25define void @foo2() #0 {
26entry:
27 %c = alloca [150 x i8], align 1
28 %arraydecay = getelementptr inbounds [150 x i8]* %c, i32 0, i32 0
29 call void @x(i8* %arraydecay)
30 %arraydecay1 = getelementptr inbounds [150 x i8]* %c, i32 0, i32 0
31 call void @x(i8* %arraydecay1)
32 ret void
33; CHECK: .ent foo2
34; CHECK: save $ra, $16, $17, [[FS:[0-9]+]]
35; CHECK: restore $ra, $16, $17, [[FS]]
36; CHECK: .end foo2
37; NEG: .ent foo2
38; NEG-NOT: save $ra, $16, $17, [[FS:[0-9]+]] # 16 bit inst
39; NEG-NOT: restore $ra, $16, $17, [[FS]] # 16 bit inst
40; NEG: .end foo2
41}
42
43; Function Attrs: nounwind
44define void @foo3() #0 {
45entry:
46 %call = call float @xf()
47 store float %call, float* @f, align 4
48 ret void
49; CHECK: .ent foo3
50; CHECK: save $ra, $16, $17, [[FS:[0-9]+]], $18
51; CHECK: restore $ra, $16, $17, [[FS]], $18
52; CHECK: .end foo3
53; NEG: .ent foo3
54; NEG-NOT: save $ra, $16, $17, [[FS:[0-9]+]], $18 # 16 bit inst
55; NEG-NOT: restore $ra, $16, $17, [[FS]], $18 # 16 bit inst
56; NEG: .end foo3
57}
58
59declare float @xf() #1
60
61attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
62attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
63
64