New TEstcase
authorChris Lattner <sabre@nondot.org>
Tue, 21 May 2002 18:04:58 +0000 (18:04 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 21 May 2002 18:04:58 +0000 (18:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2689 91177308-0d34-0410-b5e6-96231b3b80d8

test/CBackend/2002-05-21-MissingReturn.ll [new file with mode: 0644]
test/CodeGen/CBackend/2002-05-21-MissingReturn.ll [new file with mode: 0644]

diff --git a/test/CBackend/2002-05-21-MissingReturn.ll b/test/CBackend/2002-05-21-MissingReturn.ll
new file mode 100644 (file)
index 0000000..2fd3e27
--- /dev/null
@@ -0,0 +1,15 @@
+; This case was emitting code that looked like this:
+; ...
+;   llvm_BB1:       /* no statement here */
+; }
+; 
+; Which the Sun C compiler rejected, so now we are sure to put a return 
+; instruction in there if the basic block is otherwise empty.
+;
+void "test"() {
+       br label %BB1
+BB2:
+       br label %BB2
+BB1:
+       ret void
+}
diff --git a/test/CodeGen/CBackend/2002-05-21-MissingReturn.ll b/test/CodeGen/CBackend/2002-05-21-MissingReturn.ll
new file mode 100644 (file)
index 0000000..2fd3e27
--- /dev/null
@@ -0,0 +1,15 @@
+; This case was emitting code that looked like this:
+; ...
+;   llvm_BB1:       /* no statement here */
+; }
+; 
+; Which the Sun C compiler rejected, so now we are sure to put a return 
+; instruction in there if the basic block is otherwise empty.
+;
+void "test"() {
+       br label %BB1
+BB2:
+       br label %BB2
+BB1:
+       ret void
+}