From e23a7e99b37cedd0915b7011f182463e20374df5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 2 May 2002 19:54:58 +0000 Subject: [PATCH] New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2438 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Assembler/2002-05-02-ParseError.ll | 10 ++++++++ .../LevelRaise/2002-05-02-MissedRaise.ll | 23 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 test/Assembler/2002-05-02-ParseError.ll create mode 100644 test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll diff --git a/test/Assembler/2002-05-02-ParseError.ll b/test/Assembler/2002-05-02-ParseError.ll new file mode 100644 index 00000000000..3c2205d1feb --- /dev/null +++ b/test/Assembler/2002-05-02-ParseError.ll @@ -0,0 +1,10 @@ +; This should parse correctly without an 'implementation', but there seems to +; be a problem... + + %List = type { int, %List* } + +%List* "test"() +begin + ret %List* null +end + diff --git a/test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll b/test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll new file mode 100644 index 00000000000..1aba8f8f24d --- /dev/null +++ b/test/Transforms/LevelRaise/2002-05-02-MissedRaise.ll @@ -0,0 +1,23 @@ +; This testcase is not level raised properly... +; +; RUN: if as < %s | opt -raise | dis | grep ' cast ' | grep '*' +; RUN: then exit 1 +; RUN: else exit 0 +; RUN: fi + + %List = type { int, %List* } + +implementation + +%List* "createList"(uint %Depth) +begin + %reg110 = malloc uint, uint 4 + store uint %Depth, uint* %reg110 + %reg113 = call %List* %createList( uint %Depth ) + %reg217 = getelementptr uint* %reg110, uint 2 + %cast221 = cast uint* %reg217 to %List** + store %List* %reg113, %List** %cast221 + %cast222 = cast uint* %reg110 to %List* + ret %List* %cast222 +end + -- 2.34.1