1 ; RUN: opt < %s -indvars -S | not grep select 2 3 ; This loop has backedge-taken-count zero. Indvars shouldn't expand any 4 ; instructions to compute a trip count. 5 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:32:32" 7 target triple = "i386-pc-linux-gnu" 8 9 define i8* @string_expandtabs() nounwind { 10 entry: 11 br i1 undef, label %bb33, label %bb1 12 13 bb1: ; preds = %entry 14 br i1 undef, label %overflow1, label %bb15 15 16 bb15: ; preds = %bb1 17 br i1 undef, label %bb33, label %bb17 18 19 bb17: ; preds = %bb15 20 br label %bb30 21 22 bb19: ; preds = %bb30 23 br i1 undef, label %bb20, label %bb29 24 25 bb20: ; preds = %bb19 26 %0 = load i32, i32* undef, align 4 ; <i32> [#uses=1] 27 %1 = sub i32 %0, undef ; <i32> [#uses=1] 28 br label %bb23 29 30 bb21: ; preds = %bb23 31 %2 = icmp ult i8* %q.0, undef ; <i1> [#uses=1] 32 br i1 %2, label %bb22, label %overflow2 33 34 bb22: ; preds = %bb21 35 %3 = getelementptr i8, i8* %q.0, i32 1 ; <i8*> [#uses=1] 36 br label %bb23 37 38 bb23: ; preds = %bb22, %bb20 39 %i.2 = phi i32 [ %1, %bb20 ], [ %4, %bb22 ] ; <i32> [#uses=1] 40 %q.0 = phi i8* [ undef, %bb20 ], [ %3, %bb22 ] ; <i8*> [#uses=3] 41 %4 = add i32 %i.2, -1 ; <i32> [#uses=2] 42 %5 = icmp eq i32 %4, -1 ; <i1> [#uses=1] 43 br i1 %5, label %bb29, label %bb21 44 45 bb29: ; preds = %bb23, %bb19 46 %q.1 = phi i8* [ undef, %bb19 ], [ %q.0, %bb23 ] ; <i8*> [#uses=0] 47 br label %bb30 48 49 bb30: ; preds = %bb29, %bb17 50 br i1 undef, label %bb19, label %bb33 51 52 overflow2: ; preds = %bb21 53 br i1 undef, label %bb32, label %overflow1 54 55 bb32: ; preds = %overflow2 56 br label %overflow1 57 58 overflow1: ; preds = %bb32, %overflow2, %bb1 59 ret i8* null 60 61 bb33: ; preds = %bb30, %bb15, %entry 62 ret i8* undef 63 } 64