summaryrefslogtreecommitdiff
path: root/test/intervals.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-06-20 23:05:53 +0000
committerChris Lattner <sabre@nondot.org>2001-06-20 23:05:53 +0000
commitf7d11a93cbdf508f4c6d0fe2f1ad71e3bcf300d2 (patch)
treea13ff102040123174ad44ca6a3a111378247038c /test/intervals.ll
parent568320595c78d2120b23e9e8b8bd4a1f47ed58e1 (diff)
downloadllvm-f7d11a93cbdf508f4c6d0fe2f1ad71e3bcf300d2.tar.gz
llvm-f7d11a93cbdf508f4c6d0fe2f1ad71e3bcf300d2.tar.bz2
llvm-f7d11a93cbdf508f4c6d0fe2f1ad71e3bcf300d2.tar.xz
New test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/intervals.ll')
-rw-r--r--test/intervals.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/intervals.ll b/test/intervals.ll
new file mode 100644
index 0000000000..e355ff8e2a
--- /dev/null
+++ b/test/intervals.ll
@@ -0,0 +1,29 @@
+implementation
+
+;; This is a simple nested loop to test interval construction
+
+int "loop test"(int %i, int %j)
+begin
+Start:
+ %j1 = add int 0, 0
+ br label %L1Header
+
+L1Header:
+ %j2 = phi int [%j1, %Start], [%j3, %L2Done]
+
+ %i1 = add int 0, 0 ; %i1 = 0
+ br label %L2Body
+L2Body:
+ %i2 = phi int [%i1, %L1Header], [%i3, %L2Body]
+ %i3 = add int %i2, 1
+ %L2Done = seteq int %i3, 10
+ br bool %L2Done, label %L2Done, label %L2Body
+L2Done:
+ %j3 = add int %j2, %i3
+ %L1Done = seteq int %j3, 100
+ br bool %L1Done, label %L1Done, label %L1Header
+
+L1Done:
+ ret int %j3
+end
+