• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -licm | lli
2
3define i32 @main() {
4entry:
5	br label %Loop
6Loop:		; preds = %LoopCont, %entry
7	br i1 true, label %LoopCont, label %Out
8LoopCont:		; preds = %Loop
9	%X = add i32 1, 0		; <i32> [#uses=1]
10	br i1 true, label %Out, label %Loop
11Out:		; preds = %LoopCont, %Loop
12	%V = phi i32 [ 2, %Loop ], [ %X, %LoopCont ]		; <i32> [#uses=1]
13	%V2 = sub i32 %V, 1		; <i32> [#uses=1]
14	ret i32 %V2
15}
16
17