From 94c75eccf157310d623e559688318d5ed3a031b3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 21 May 2002 18:04:58 +0000 Subject: [PATCH] New TEstcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2689 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CBackend/2002-05-21-MissingReturn.ll | 15 +++++++++++++++ test/CodeGen/CBackend/2002-05-21-MissingReturn.ll | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/CBackend/2002-05-21-MissingReturn.ll create mode 100644 test/CodeGen/CBackend/2002-05-21-MissingReturn.ll diff --git a/test/CBackend/2002-05-21-MissingReturn.ll b/test/CBackend/2002-05-21-MissingReturn.ll new file mode 100644 index 00000000000..2fd3e27faf0 --- /dev/null +++ b/test/CBackend/2002-05-21-MissingReturn.ll @@ -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 index 00000000000..2fd3e27faf0 --- /dev/null +++ b/test/CodeGen/CBackend/2002-05-21-MissingReturn.ll @@ -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 +}