Home | History | Annotate | Download | only in Other
      1 ; RUN: opt < %s -loop-unswitch -indvars -disable-output
      2 ; Require SCEV before LCSSA.
      3 define void @foo() {
      4 entry:
      5 	%i = alloca i32, align 4		; <i32*> [#uses=5]
      6 	%"alloca point" = bitcast i32 0 to i32		; <i32> [#uses=0]
      7 	store i32 0, i32* %i, align 4
      8 	br label %bb3
      9 
     10 bb:		; preds = %bb3
     11 	%tmp = load i32* %i, align 4		; <i32> [#uses=1]
     12 	call void @bar( i32 %tmp )
     13 	%tmp1 = load i32* %i, align 4		; <i32> [#uses=1]
     14 	%tmp2 = add i32 %tmp1, 1		; <i32> [#uses=1]
     15 	store i32 %tmp2, i32* %i, align 4
     16 	br label %bb3
     17 
     18 bb3:		; preds = %bb, %entry
     19 	%tmp4 = load i32* %i, align 4		; <i32> [#uses=1]
     20 	%tmp5 = icmp sle i32 %tmp4, 9		; <i1> [#uses=1]
     21 	%tmp56 = zext i1 %tmp5 to i8		; <i8> [#uses=1]
     22 	%toBool = icmp ne i8 %tmp56, 0		; <i1> [#uses=1]
     23 	br i1 %toBool, label %bb, label %bb7
     24 
     25 bb7:		; preds = %bb3
     26 	br label %return
     27 
     28 return:		; preds = %bb7
     29 	ret void
     30 }
     31 
     32 declare void @bar(i32)
     33