Stackmap shadows should consider call returns a branch target.
[oota-llvm.git] / test / CodeGen / Mips / fpnotneeded.ll
1 ; RUN: llc  -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips32 -relocation-model=static -O3 < %s -mips-os16  | FileCheck %s -check-prefix=32
2
3 ; RUN: llc  -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips32 -relocation-model=static -O3 -mips16-constant-islands < %s -mips-os16  | FileCheck %s -check-prefix=cisle
4
5 @i = global i32 1, align 4
6 @f = global float 1.000000e+00, align 4
7
8 define void @vv() #0 {
9 entry:
10   ret void
11 }
12
13 ; 32:   .set    mips16
14 ; 32:   .ent    vv
15
16 ; 32:   save    {{.+}}
17 ; 32:   restore {{.+}} 
18 ; 32:   .end    vv
19
20 define i32 @iv() #0 {
21 entry:
22   %0 = load i32* @i, align 4
23   ret i32 %0
24 }
25
26 ; 32:   .set    mips16
27 ; 32:   .ent    iv
28
29 ; 32:   save    {{.+}}
30 ; 32:   restore {{.+}} 
31 ; 32:   .end    iv
32
33 define void @vif(i32 %i, float %f) #0 {
34 entry:
35   %i.addr = alloca i32, align 4
36   %f.addr = alloca float, align 4
37   store i32 %i, i32* %i.addr, align 4
38   store float %f, float* %f.addr, align 4
39   ret void
40 }
41
42 ; 32:   .set    mips16
43 ; 32:   .ent    vif
44
45 ; 32:   save    {{.+}}
46 ; 32:   restore {{.+}} 
47 ; 32:   .end    vif
48
49 define void @foo() #0 {
50 entry:
51   store float 2.000000e+00, float* @f, align 4
52   ret void
53 }
54
55 ; 32:   .set    mips16
56 ; 32:   .ent    foo
57
58 ; 32:   save    {{.+}}
59 ; 32:   restore {{.+}} 
60 ; 32:   .end    foo
61
62 ; cisle:        .end    foo
63
64 attributes #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" "unsafe-fp-math"="false" "use-soft-float"="false" }
65
66
67 define float @fv() #0 {
68 entry:
69   ret float 1.000000e+00
70 }
71
72 ; 32:   .set    nomips16
73 ; 32:   .ent    fv
74 ; 32:   .set    noreorder
75 ; 32:   .set    nomacro
76 ; 32:   .set    noat
77 ; 32:   jr      $ra
78 ; 32:   .set    at
79 ; 32:   .set    macro
80 ; 32:   .set    reorder
81 ; 32:   .end    fv