Fix r194019 as requested by Eric Christopher.
[oota-llvm.git] / test / CodeGen / Mips / const4.ll
1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=static -mips16-constant-islands -mips-constant-islands-small-offset=20  < %s | FileCheck %s -check-prefix=offset20
2
3 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -soft-float -mips16-hard-float -relocation-model=static -mips16-constant-islands -mips-constant-islands-small-offset=40  < %s | FileCheck %s -check-prefix=offset40
4
5
6 @i = common global i32 0, align 4
7 @b = common global i32 0, align 4
8
9 ; Function Attrs: nounwind
10 define void @t() #0 {
11 entry:
12   store i32 -559023410, i32* @i, align 4
13   %0 = load i32* @b, align 4
14   %tobool = icmp ne i32 %0, 0
15   br i1 %tobool, label %if.then, label %if.else
16 ; offset20: lw  ${{[0-9]+}}, $CPI0_1    # 16 bit inst
17 ; offset20:     b       $BB0_2
18 ; offset20:     .align  2
19 ; offset20: $CPI0_0:
20 ; offset20:     .4byte  3735943886
21 ; offset20: $BB0_2: 
22
23 ; offset40:     beqz    ${{[0-9]+}}, $BB0_3
24 ; offset40:     jal     foo
25 ; offset40:     nop
26 ; offset40:     b       $BB0_4
27 ; offset40:     .align  2
28 ; offset40: $CPI0_0:
29 ; offset40:     .4byte  3735943886
30 ; offset40: $BB0_3:
31 ; offset40:     jal     goo
32
33 if.then:                                          ; preds = %entry
34   call void bitcast (void (...)* @foo to void ()*)()
35   br label %if.end
36
37 if.else:                                          ; preds = %entry
38   call void bitcast (void (...)* @goo to void ()*)()
39   br label %if.end
40
41 if.end:                                           ; preds = %if.else, %if.then
42   call void bitcast (void (...)* @hoo to void ()*)()
43   call void bitcast (void (...)* @hoo to void ()*)()
44   call void bitcast (void (...)* @hoo to void ()*)()
45   call void bitcast (void (...)* @hoo to void ()*)()
46   call void bitcast (void (...)* @hoo to void ()*)()
47   call void bitcast (void (...)* @hoo to void ()*)()
48   call void bitcast (void (...)* @hoo to void ()*)()
49   call void bitcast (void (...)* @hoo to void ()*)()
50   ret void
51 }
52
53 declare void @foo(...) #1
54
55 declare void @goo(...) #1
56
57 declare void @hoo(...) #1
58
59 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" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="true" }
60 attributes #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"="true" }
61
62 !llvm.ident = !{!0}
63
64 !0 = metadata !{metadata !"clang version 3.4 (gitosis@dmz-portal.mips.com:clang.git 3a50d847e098f36e3bf8bc14eea07a6cc35f7803) (gitosis@dmz-portal.mips.com:llvm.git f52db0b69f0c888bdc98bb2f13aaecc1e83288a9)"}