[ARM] Adjust how NEON shifts are lowered
[llvm-core.git] / test / Transforms / LoopStrengthReduce / 2013-01-05-IndBr.ll
blob8a5a0a4c5fcdadd362d7da5830ce7f9be45c36e2
1 ; RUN: opt -loop-reduce -S < %s | FileCheck %s
3 ; Indirect branch in the preheader crashes replaceCongruentIVs.
4 ; rdar://12910141
6 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
8 ; CHECK-LABEL: @test(
9 ; CHECK: bb8:
10 ; CHECK-NEXT: phi i8
11 ; CHECK-NEXT: phi i8
12 ; CHECK: ret void
13 define void @test() nounwind ssp {
14 bb:
15   br label %bb190
17 bb8:                                              ; preds = %bb190, %bb11
18   %tmp = phi i8 [ %tmp14, %bb11 ], [ 25, %bb190 ]
19   %tmp9 = phi i8 [ %tmp12, %bb11 ], [ 25, %bb190 ]
20   %tmp10 = add i8 %tmp, -5
21   indirectbr i8* undef, [label %bb11, label %bb15]
23 bb11:                                             ; preds = %bb8
24   %tmp12 = add i8 %tmp9, 1
25   %tmp13 = add i8 %tmp9, -19
26   %tmp14 = add i8 %tmp, 1
27   indirectbr i8* undef, [label %bb8]
29 bb15:                                             ; preds = %bb8
30   indirectbr i8* undef, [label %bb16]
32 bb16:                                             ; preds = %bb16, %bb15
33   indirectbr i8* undef, [label %bb37, label %bb190]
36 bb37:                                             ; preds = %bb190
37   indirectbr i8* undef, [label %bb38]
39 bb38:                                             ; preds = %bb37, %bb5
40   ret void
42 bb190:                                            ; preds = %bb189, %bb187
43   indirectbr i8* undef, [label %bb37, label %bb8]