This should always be signed chars, so use int8_t. This fixes a miscompile when
[llvm/stm8.git] / test / CodeGen / X86 / 2009-09-22-CoalescerBug.ll
blob33f35f881e85348994456375cbe382bcc3bbdf05
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10
3 define i32 @main(i32 %argc, i8** nocapture %argv) nounwind ssp {
4 entry:
5   br i1 undef, label %bb, label %bb1
7 bb:                                               ; preds = %entry
8   ret i32 3
10 bb1:                                              ; preds = %entry
11   br i1 undef, label %bb3, label %bb2
13 bb2:                                              ; preds = %bb1
14   ret i32 3
16 bb3:                                              ; preds = %bb1
17   br i1 undef, label %bb.i18, label %quantum_getwidth.exit
19 bb.i18:                                           ; preds = %bb.i18, %bb3
20   br i1 undef, label %bb.i18, label %quantum_getwidth.exit
22 quantum_getwidth.exit:                            ; preds = %bb.i18, %bb3
23   br i1 undef, label %bb4, label %bb6.preheader
25 bb4:                                              ; preds = %quantum_getwidth.exit
26   unreachable
28 bb6.preheader:                                    ; preds = %quantum_getwidth.exit
29   br i1 undef, label %bb.i1, label %bb1.i2
31 bb.i1:                                            ; preds = %bb6.preheader
32   unreachable
34 bb1.i2:                                           ; preds = %bb6.preheader
35   br i1 undef, label %bb2.i, label %bb3.i4
37 bb2.i:                                            ; preds = %bb1.i2
38   unreachable
40 bb3.i4:                                           ; preds = %bb1.i2
41   br i1 undef, label %quantum_new_qureg.exit, label %bb4.i
43 bb4.i:                                            ; preds = %bb3.i4
44   unreachable
46 quantum_new_qureg.exit:                           ; preds = %bb3.i4
47   br i1 undef, label %bb9, label %bb11.thread
49 bb11.thread:                                      ; preds = %quantum_new_qureg.exit
50   %.cast.i = zext i32 undef to i64                ; <i64> [#uses=1]
51   br label %bb.i37
53 bb9:                                              ; preds = %quantum_new_qureg.exit
54   unreachable
56 bb.i37:                                           ; preds = %bb.i37, %bb11.thread
57   %0 = load i64* undef, align 8                   ; <i64> [#uses=1]
58   %1 = shl i64 %0, %.cast.i                       ; <i64> [#uses=1]
59   store i64 %1, i64* undef, align 8
60   br i1 undef, label %bb.i37, label %quantum_addscratch.exit
62 quantum_addscratch.exit:                          ; preds = %bb.i37
63   br i1 undef, label %bb12.preheader, label %bb14
65 bb12.preheader:                                   ; preds = %quantum_addscratch.exit
66   unreachable
68 bb14:                                             ; preds = %quantum_addscratch.exit
69   br i1 undef, label %bb17, label %bb.nph
71 bb.nph:                                           ; preds = %bb14
72   unreachable
74 bb17:                                             ; preds = %bb14
75   br i1 undef, label %bb1.i7, label %quantum_measure.exit
77 bb1.i7:                                           ; preds = %bb17
78   br label %quantum_measure.exit
80 quantum_measure.exit:                             ; preds = %bb1.i7, %bb17
81   switch i32 undef, label %bb21 [
82     i32 -1, label %bb18
83     i32 0, label %bb20
84   ]
86 bb18:                                             ; preds = %quantum_measure.exit
87   unreachable
89 bb20:                                             ; preds = %quantum_measure.exit
90   unreachable
92 bb21:                                             ; preds = %quantum_measure.exit
93   br i1 undef, label %quantum_frac_approx.exit, label %bb1.i
95 bb1.i:                                            ; preds = %bb21
96   unreachable
98 quantum_frac_approx.exit:                         ; preds = %bb21
99   br i1 undef, label %bb25, label %bb26
101 bb25:                                             ; preds = %quantum_frac_approx.exit
102   unreachable
104 bb26:                                             ; preds = %quantum_frac_approx.exit
105   br i1 undef, label %quantum_gcd.exit, label %bb.i
107 bb.i:                                             ; preds = %bb.i, %bb26
108   br i1 undef, label %quantum_gcd.exit, label %bb.i
110 quantum_gcd.exit:                                 ; preds = %bb.i, %bb26
111   br i1 undef, label %bb32, label %bb33
113 bb32:                                             ; preds = %quantum_gcd.exit
114   br i1 undef, label %bb.i.i, label %quantum_delete_qureg.exit
116 bb.i.i:                                           ; preds = %bb32
117   ret i32 0
119 quantum_delete_qureg.exit:                        ; preds = %bb32
120   ret i32 0
122 bb33:                                             ; preds = %quantum_gcd.exit
123   unreachable