blob: 5d947e6fe45d77c31e9c0d629fe41001d7c0e760 [file] [log] [blame]
Krzysztof Parzyszekc8b6eca2016-10-03 20:17:20 +00001; RUN: llc -march=hexagon -verify-machineinstrs < %s | FileCheck %s
2; Verify that the code compiles successfully.
3; CHECK: call printf
4
5target triple = "hexagon"
6
7%struct.0 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
8
9@.str.13 = external unnamed_addr constant [60 x i8], align 1
10
11declare void @printf(i8* nocapture readonly, ...) local_unnamed_addr #0
12
13declare void @danny() local_unnamed_addr #0
14declare zeroext i8 @sammy() local_unnamed_addr #0
15
16; Function Attrs: nounwind
17define void @main() local_unnamed_addr #0 {
18entry:
19 br i1 undef, label %if.then8, label %if.end10
20
21if.then8: ; preds = %entry
22 ret void
23
24if.end10: ; preds = %entry
25 br label %do.body
26
27do.body: ; preds = %if.end88.do.body_crit_edge, %if.end10
28 %cond = icmp eq i32 undef, 0
29 br i1 %cond, label %if.end49, label %if.then124
30
31if.end49: ; preds = %do.body
32 br i1 undef, label %if.end55, label %if.then53
33
34if.then53: ; preds = %if.end49
35 call void @danny()
36 br label %if.end55
37
38if.end55: ; preds = %if.then53, %if.end49
39 %call76 = call zeroext i8 @sammy() #0
40 switch i8 %call76, label %sw.epilog79 [
41 i8 0, label %sw.bb77
42 i8 3, label %sw.bb77
43 ]
44
45sw.bb77: ; preds = %if.end55, %if.end55
46 unreachable
47
48sw.epilog79: ; preds = %if.end55
49 br i1 undef, label %if.end88, label %if.then81
50
51if.then81: ; preds = %sw.epilog79
52 %div87 = fdiv float 0.000000e+00, undef
53 br label %if.end88
54
55if.end88: ; preds = %if.then81, %sw.epilog79
56 %t.1 = phi float [ undef, %sw.epilog79 ], [ %div87, %if.then81 ]
57 %div89 = fdiv float 1.000000e+00, %t.1
58 %mul92 = fmul float undef, %div89
59 %div93 = fdiv float %mul92, 1.000000e+06
60 %conv107 = fpext float %div93 to double
61 call void (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.13, i32 0, i32 0), double %conv107, double undef, i64 undef, i32 undef) #0
62 br i1 undef, label %if.end88.do.body_crit_edge, label %if.then124
63
64if.end88.do.body_crit_edge: ; preds = %if.end88
65 br label %do.body
66
67if.then124: ; preds = %if.end88, %do.body
68 unreachable
69}
70
71
72attributes #0 = { nounwind }
73