• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -analyze -scalar-evolution
2; PR1827
3
4declare void @use(i32)
5
6define void @foo() {
7entry:
8	br label %loop_1
9
10loop_1:		; preds = %loop_1, %entry
11	%a = phi i32 [ 2, %entry ], [ %b, %loop_1 ]		; <i32> [#uses=2]
12	%c = phi i32 [ 5, %entry ], [ %d, %loop_1 ]		; <i32> [#uses=1]
13	%b = add i32 %a, 1		; <i32> [#uses=1]
14	%d = add i32 %c, %a		; <i32> [#uses=3]
15	%A = icmp ult i32 %d, 50		; <i1> [#uses=1]
16	br i1 %A, label %loop_1, label %endloop
17
18endloop:		; preds = %loop_1
19	call void @use(i32 %d)
20	ret void
21}
22