aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/TailDup
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-23 19:37:39 +0000
committerChris Lattner <sabre@nondot.org>2003-08-23 19:37:39 +0000
commit59bc1a7ad33b29800529cbf289705c6f1ef3c317 (patch)
treef2c78134d9b0ea6140719bde7add766ae27c543b /test/Transforms/TailDup
parent72987eeafd0afba2bf2c2860e9cffb0051f26e93 (diff)
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/TailDup')
-rw-r--r--test/Transforms/TailDup/2003-08-23-InvalidatedPointers.ll40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/Transforms/TailDup/2003-08-23-InvalidatedPointers.ll b/test/Transforms/TailDup/2003-08-23-InvalidatedPointers.ll
new file mode 100644
index 0000000000..35c8264fb6
--- /dev/null
+++ b/test/Transforms/TailDup/2003-08-23-InvalidatedPointers.ll
@@ -0,0 +1,40 @@
+; RUN: as < %s | opt -tailduplicate -disable-output
+
+implementation
+
+int %sell_haggle() {
+entry: ; No predecessors!
+ br bool false, label %then.5, label %UnifiedExitNode
+
+then.5: ; preds = %entry
+ br bool false, label %loopentry.1.preheader, label %else.1
+
+else.1: ; preds = %then.5
+ br label %loopentry.1.preheader
+
+loopentry.1.preheader: ; preds = %then.5, %else.1
+ %final_ask.0 = phi int [ 0, %else.1 ], [ 0, %then.5 ] ; <int> [#uses=2]
+ br label %loopentry.1
+
+loopentry.1: ; preds = %loopentry.1.preheader, %endif.17
+ switch uint 0, label %UnifiedExitNode [
+ uint 2, label %UnifiedExitNode
+ uint 1, label %endif.16
+ ]
+
+endif.16: ; preds = %loopentry.1
+ br bool false, label %then.17, label %UnifiedExitNode
+
+then.17: ; preds = %endif.16
+ br bool false, label %then.18, label %endif.17
+
+then.18: ; preds = %then.17
+ br bool false, label %endif.17, label %UnifiedExitNode
+
+endif.17: ; preds = %then.17, %then.18
+ %cur_ask.3 = phi int [ %final_ask.0, %then.17 ], [ %final_ask.0, %then.18 ] ; <int> [#uses=0]
+ br bool false, label %loopentry.1, label %UnifiedExitNode
+
+UnifiedExitNode: ; preds = %entry, %endif.17, %then.18, %endif.16, %loopentry.1, %loopentry.1
+ ret int 0
+}