Krzysztof Parzyszek | c8b6eca | 2016-10-03 20:17:20 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon -verify-machineinstrs < %s | FileCheck %s |
| 2 | ; Verify that the code compiles successfully. |
| 3 | ; CHECK: call printf |
| 4 | |
| 5 | target 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 | |
| 11 | declare void @printf(i8* nocapture readonly, ...) local_unnamed_addr #0 |
| 12 | |
| 13 | declare void @danny() local_unnamed_addr #0 |
| 14 | declare zeroext i8 @sammy() local_unnamed_addr #0 |
| 15 | |
| 16 | ; Function Attrs: nounwind |
| 17 | define void @main() local_unnamed_addr #0 { |
| 18 | entry: |
| 19 | br i1 undef, label %if.then8, label %if.end10 |
| 20 | |
| 21 | if.then8: ; preds = %entry |
| 22 | ret void |
| 23 | |
| 24 | if.end10: ; preds = %entry |
| 25 | br label %do.body |
| 26 | |
| 27 | do.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 | |
| 31 | if.end49: ; preds = %do.body |
| 32 | br i1 undef, label %if.end55, label %if.then53 |
| 33 | |
| 34 | if.then53: ; preds = %if.end49 |
| 35 | call void @danny() |
| 36 | br label %if.end55 |
| 37 | |
| 38 | if.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 | |
| 45 | sw.bb77: ; preds = %if.end55, %if.end55 |
| 46 | unreachable |
| 47 | |
| 48 | sw.epilog79: ; preds = %if.end55 |
| 49 | br i1 undef, label %if.end88, label %if.then81 |
| 50 | |
| 51 | if.then81: ; preds = %sw.epilog79 |
| 52 | %div87 = fdiv float 0.000000e+00, undef |
| 53 | br label %if.end88 |
| 54 | |
| 55 | if.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 | |
| 64 | if.end88.do.body_crit_edge: ; preds = %if.end88 |
| 65 | br label %do.body |
| 66 | |
| 67 | if.then124: ; preds = %if.end88, %do.body |
| 68 | unreachable |
| 69 | } |
| 70 | |
| 71 | |
| 72 | attributes #0 = { nounwind } |
| 73 | |