diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-14 16:35:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-14 16:35:50 +0000 |
commit | 34fc767c105e61c8e6a93541634e015f964b14b4 (patch) | |
tree | 79c744c6dc0fb800cd090952844e5596f84d3afd /test | |
parent | 4b3f94573d2bee1cfaa276a9b447dfc1e250a911 (diff) | |
download | external_llvm-34fc767c105e61c8e6a93541634e015f964b14b4.zip external_llvm-34fc767c105e61c8e6a93541634e015f964b14b4.tar.gz external_llvm-34fc767c105e61c8e6a93541634e015f964b14b4.tar.bz2 |
New testcase for bugfx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll b/test/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll new file mode 100644 index 0000000..43ea888 --- /dev/null +++ b/test/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll @@ -0,0 +1,22 @@ +; This testcase found a bug in ConvertableToGEP that could cause an infinite loop +; Note that this code is actually miscompiled from the input source, but despite +; that, level raise should not hang! +; +; RUN: as < %s | opt -raise + + %Disjunct = type { \2 *, short, sbyte, sbyte *, { short, short, sbyte, sbyte, \2, sbyte * } *, { short, short, sbyte, sbyte, \2, sbyte * } * } +%chosen_disjuncts = uninitialized global %Disjunct * * ; <%Disjunct * * *> [#uses=1] +implementation + +void "build_image_array"() +begin +bb0: ;[#uses=0] + %reg109 = getelementptr %Disjunct * * * %chosen_disjuncts, uint 7 ; <%Disjunct * * *> [#uses=1] + %reg108 = load %Disjunct * * * %reg109, uint 0 ; <%Disjunct * *> [#uses=1] + %reg1000 = getelementptr %Disjunct * * %reg108, uint 3 ; <%Disjunct * *> [#uses=1] + %cast1007 = cast %Disjunct * * %reg1000 to sbyte * * ; <sbyte * *> [#uses=1] + %reg110 = load sbyte * * %cast1007 ; <sbyte *> [#uses=1] + %cast1008 = cast ulong 4 to sbyte * ; <sbyte *> [#uses=1] + %reg1001 = add sbyte * %reg110, %cast1008 ; <sbyte *> [#uses=0] + ret void +end |