mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
71fc5e8fce
llvm-svn: 94574
22 lines
516 B
LLVM
22 lines
516 B
LLVM
; RUN: opt < %s -analyze -scalar-evolution
|
|
; PR1827
|
|
|
|
declare void @use(i32)
|
|
|
|
define void @foo() {
|
|
entry:
|
|
br label %loop_1
|
|
|
|
loop_1: ; preds = %loop_1, %entry
|
|
%a = phi i32 [ 2, %entry ], [ %b, %loop_1 ] ; <i32> [#uses=2]
|
|
%c = phi i32 [ 5, %entry ], [ %d, %loop_1 ] ; <i32> [#uses=1]
|
|
%b = add i32 %a, 1 ; <i32> [#uses=1]
|
|
%d = add i32 %c, %a ; <i32> [#uses=3]
|
|
%A = icmp ult i32 %d, 50 ; <i1> [#uses=1]
|
|
br i1 %A, label %loop_1, label %endloop
|
|
|
|
endloop: ; preds = %loop_1
|
|
call void @use(i32 %d)
|
|
ret void
|
|
}
|