diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-10 20:04:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-10 20:04:19 +0000 |
commit | 2b37c03f8c177c8de91de63baed2e0c18d14f376 (patch) | |
tree | 1954aba8a22f12b9e39301781ad9747902646747 /test | |
parent | 9a66d5109e5b7efa7faf0f042bd9812c564f6139 (diff) | |
download | external_llvm-2b37c03f8c177c8de91de63baed2e0c18d14f376.zip external_llvm-2b37c03f8c177c8de91de63baed2e0c18d14f376.tar.gz external_llvm-2b37c03f8c177c8de91de63baed2e0c18d14f376.tar.bz2 |
Clean up pointer using testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/LevelRaise/2002-03-11-IterInvalidate.ll | 47 | ||||
-rw-r--r-- | test/Transforms/LevelRaise/2002-03-20-Crash.ll | 6 | ||||
-rw-r--r-- | test/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll | 4 |
3 files changed, 7 insertions, 50 deletions
diff --git a/test/Transforms/LevelRaise/2002-03-11-IterInvalidate.ll b/test/Transforms/LevelRaise/2002-03-11-IterInvalidate.ll deleted file mode 100644 index 774f702..0000000 --- a/test/Transforms/LevelRaise/2002-03-11-IterInvalidate.ll +++ /dev/null @@ -1,47 +0,0 @@ -; Assertion failure in LevelRaise caused by this code: -; -; LevelRaise.cpp:92: failed assertion `I->getOpcode() == Instruction::Add && I->getNumOperands() == 2 && "Use is not a valid add instruction!"' -; -; RUN: as < %s | opt -raise - -%lit_base = uninitialized global [26 x int] ; <[26 x int] *> [#uses=1] -%leaves = uninitialized global [26 x int] ; <[26 x int] *> [#uses=1] -%parents = uninitialized global [26 x int] ; <[26 x int] *> [#uses=1] -implementation - -int "build_tree"(int %ml) -begin -; <label>:0 ;[#uses=2] - %ml = alloca int ; <int *> [#uses=2] - store int %ml, int * %ml - %reg107 = load int * %ml ; <int> [#uses=1] - br label %bb2 - -bb2: ;[#uses=4] - %reg137 = phi int [ %reg140, %bb2 ], [ %reg107, %0 ] ; <int> [#uses=2] - %reg138 = phi uint [ %reg139, %bb2 ], [ 0, %0 ] ; <uint> [#uses=3] - %cast1005 = cast int %reg137 to uint ; <uint> [#uses=1] - %reg111 = shl uint %cast1005, ubyte 2 ; <uint> [#uses=1] - %cast112 = cast uint %reg111 to sbyte * ; <sbyte *> [#uses=3] - %cast1002 = cast [26 x int] * %parents to sbyte * ; <sbyte *> [#uses=1] - %reg115 = add sbyte * %cast112, %cast1002 ; <sbyte *> [#uses=1] - ;%cast1006 = cast sbyte * %reg115 to uint * ; <uint *> [#uses=1] - - %cast1003 = cast [26 x int] * %lit_base to sbyte * ; <sbyte *> [#uses=1] - %reg121 = add sbyte * %cast112, %cast1003 ; <sbyte *> [#uses=2] - %cast1007 = cast sbyte * %reg121 to uint * ; <uint *> [#uses=1] - %reg128 = load uint * %cast1007 ; <uint> [#uses=1] - %reg129 = sub uint %reg128, %reg138 ; <uint> [#uses=1] - %cast1008 = cast sbyte * %reg121 to uint * ; <uint *> [#uses=1] - ;store uint %reg129, uint * %cast1008 - %cast1004 = cast [26 x int] * %leaves to sbyte * ; <sbyte *> [#uses=1] - %reg135 = add sbyte * %cast112, %cast1004 ; <sbyte *> [#uses=1] - %cast1009 = cast sbyte * %reg135 to uint * ; <uint *> [#uses=1] - %reg136 = load uint * %cast1009 ; <uint> [#uses=1] - %reg139 = add uint %reg138, %reg136 ; <uint> [#uses=1] - %reg140 = add int %reg137, -1 ; <int> [#uses=1] - br bool false, label %bb2, label %bb3 - -bb3: ;[#uses=1] - ret int %reg137 -end diff --git a/test/Transforms/LevelRaise/2002-03-20-Crash.ll b/test/Transforms/LevelRaise/2002-03-20-Crash.ll index 81ba756..49fcd88 100644 --- a/test/Transforms/LevelRaise/2002-03-20-Crash.ll +++ b/test/Transforms/LevelRaise/2002-03-20-Crash.ll @@ -10,8 +10,10 @@ implementation %Village *"get_results"(%Village * %village) begin bb0: ;[#uses=1] - %cast121 = cast int 24 to %Village * ; <%Village *> [#uses=1] - %reg123 = add %Village * %village, %cast121 ; <%Village *> [#uses=1] + %cast121 = cast int 24 to ulong ; <%Village *> [#uses=1] + %A = cast %Village* %village to ulong + %reg123 = add ulong %A, %cast121 ; <%Village *> [#uses=1] + %reg123 = cast ulong %reg123 to %Village* %idx = getelementptr %Village * %reg123, uint 0, ubyte 0, uint 0 ; <%Village *> [#uses=1] %reg118 = load %Village** %idx ret %Village *%reg118 diff --git a/test/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll b/test/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll index c9277fb..6a7faf4 100644 --- a/test/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll +++ b/test/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll @@ -5,6 +5,8 @@ implementation sbyte* %test(int* %ptr) { %A = cast int* %ptr to sbyte * - %B = add sbyte* %A, %A + %A = cast sbyte* %A to ulong + %B = add ulong %A, %A + %B = cast ulong %B to sbyte* ret sbyte * %B } |