• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -lcssa -S | FileCheck %s
2; RUN: opt < %s -passes=lcssa -S | FileCheck %s
3
4declare i1 @c1()
5
6declare i1 @c2()
7
8define i32 @foo() {
9; CHECK-LABEL: @foo
10entry:
11	br label %loop_begin
12loop_begin:		; preds = %loop_body.2, %entry
13	br i1 true, label %loop_body.1, label %loop_exit2
14loop_body.1:		; preds = %loop_begin
15	%X.1 = add i32 0, 1		; <i32> [#uses=1]
16	%rel.1 = call i1 @c1( )		; <i1> [#uses=1]
17	br i1 %rel.1, label %loop_exit, label %loop_body.2
18loop_body.2:		; preds = %loop_body.1
19	%rel.2 = call i1 @c2( )		; <i1> [#uses=1]
20	br i1 %rel.2, label %loop_exit, label %loop_begin
21loop_exit:		; preds = %loop_body.2, %loop_body.1
22; CHECK: %X.1.lcssa = phi
23	ret i32 %X.1
24loop_exit2:		; preds = %loop_begin
25	ret i32 1
26; CHECK-NOT: %X.1.lcssa1
27}
28
29