This should always be signed chars, so use int8_t. This fixes a miscompile when
[llvm/stm8.git] / test / CodeGen / X86 / legalize-sub-zero-2.ll
blobf02ca715aeeb1270c1412b1971e808b01fa8d9ef
1 ; RUN: llc < %s -mtriple=i386-apple-darwin
3 define fastcc void @foo(i32 %type) nounwind optsize {
4 entry:
5   switch i32 %type, label %bb26 [
6     i32 33634, label %bb11
7     i32 5121, label %bb27
8   ]
10 bb11:                                             ; preds = %entry
11   br label %bb27
13 bb26:                                             ; preds = %entry
14   unreachable
16 bb27:                                             ; preds = %bb11, %entry
17   %srcpb.0 = phi i32 [ 1, %bb11 ], [ 0, %entry ]
18   br i1 undef, label %bb348, label %bb30.lr.ph
20 bb30.lr.ph:                                       ; preds = %bb27
21   %.sum743 = shl i32 %srcpb.0, 1
22   %0 = mul i32 %srcpb.0, -2
23   %.sum745 = add i32 %.sum743, %0
24   br i1 undef, label %bb70, label %bb71
26 bb70:                                             ; preds = %bb30.lr.ph
27   unreachable
29 bb71:                                             ; preds = %bb30.lr.ph
30   br i1 undef, label %bb92, label %bb80
32 bb80:                                             ; preds = %bb71
33   unreachable
35 bb92:                                             ; preds = %bb71
36   %1 = getelementptr inbounds i8* undef, i32 %.sum745
37   unreachable
39 bb348:                                            ; preds = %bb27
40   ret void