blob: 96dfce915e90995b7dd4ce922f962924ae49c466 [file] [log] [blame]
Daniel Sanders8008de52015-10-15 14:34:23 +00001; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mips16-hard-float -mattr=+soft-float -relocation-model=static < %s | FileCheck %s -check-prefix=CHECK-STATIC16
Reed Kotlerf0e69682013-11-12 02:27:12 +00002
3; ModuleID = 'simplebr.c'
4target datalayout = "E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64"
5target triple = "mips--linux-gnu"
6
7@i = common global i32 0, align 4
8
9; Function Attrs: nounwind
10define void @foo() #0 {
11entry:
David Blaikiea79ac142015-02-27 21:17:42 +000012 %0 = load i32, i32* @i, align 4
Reed Kotlerf0e69682013-11-12 02:27:12 +000013 %tobool = icmp ne i32 %0, 0
14 br i1 %tobool, label %if.then, label %if.else
15
16if.then: ; preds = %entry
17 call void bitcast (void (...)* @goo to void ()*)()
18 br label %if.end
19
20if.else: ; preds = %entry
21 call void bitcast (void (...)* @hoo to void ()*)()
22 br label %if.end
23
24if.end: ; preds = %if.else, %if.then
25 ret void
26}
27
28; CHECK-STATIC16: b $BB{{[0-9]+}}_{{[0-9]+}} # 16 bit inst
29
30declare void @goo(...) #1
31
32declare void @hoo(...) #1
33
34attributes #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" }
35attributes #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" }
36
37