mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 18:31:04 +00:00
86b6f80a4c
Patch by Jakub Staszak! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102928 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
512 B
LLVM
24 lines
512 B
LLVM
; RUN: llvm-as < %s | opt -loop-index-split | llvm-dis | not grep clone
|
|
|
|
declare void @f()
|
|
|
|
define i32 @main() {
|
|
entry:
|
|
br label %head
|
|
head:
|
|
%i = phi i32 [0, %entry], [%i1, %tail]
|
|
call void @f()
|
|
%splitcond = icmp slt i32 %i, 2
|
|
br i1 %splitcond, label %yes, label %no
|
|
yes:
|
|
br label %tail
|
|
no:
|
|
br label %tail
|
|
tail:
|
|
%i1 = add i32 %i, 1
|
|
%exitcond = icmp slt i32 %i1, 4
|
|
br i1 %exitcond, label %head, label %exit
|
|
exit:
|
|
ret i32 0
|
|
}
|