From b07a4409c238d2be03b9248d16da7b03eb4077a9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 31 Oct 2002 01:25:13 +0000 Subject: [PATCH] New testcases git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4455 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/DSAnalysis/basictest.ll | 22 ++++++++++++++++ test/Transforms/DSAnalysis/indcalltest.ll | 32 +++++++++++++++++++++++ test/Transforms/DSAnalysis/simpletest.ll | 11 ++++++++ 3 files changed, 65 insertions(+) create mode 100644 test/Transforms/DSAnalysis/basictest.ll create mode 100644 test/Transforms/DSAnalysis/indcalltest.ll create mode 100644 test/Transforms/DSAnalysis/simpletest.ll diff --git a/test/Transforms/DSAnalysis/basictest.ll b/test/Transforms/DSAnalysis/basictest.ll new file mode 100644 index 00000000000..407d4953758 --- /dev/null +++ b/test/Transforms/DSAnalysis/basictest.ll @@ -0,0 +1,22 @@ + +; very simple test + +implementation + +int *%foo(ulong %A, double %B, long %C) { + %X = malloc int* + %D = cast int** %X to ulong + %E = cast ulong %D to int* + store int* %E, int** %X + + %F = malloc {int} + %G = getelementptr {int}* %F, long 0, ubyte 0 + store int* %G, int** %X + + %K = malloc int ** + store int** %X, int***%K + + %H = cast long %C to int* + ret int* null ; %H +} + diff --git a/test/Transforms/DSAnalysis/indcalltest.ll b/test/Transforms/DSAnalysis/indcalltest.ll new file mode 100644 index 00000000000..a45c3b9a12a --- /dev/null +++ b/test/Transforms/DSAnalysis/indcalltest.ll @@ -0,0 +1,32 @@ +%G = global int 2 ; [#uses=1] +%H = global int* null + +%I = global int** null +%J = global int** null + +implementation ; Functions: + +void %foo1() { + store int* %G, int** %H + store int** %H, int ***%I + ret void +} + +void %foo2() { ; No predecessors! + store int 7, int* %G + store int** %H, int ***%J + ret void +} + +void %test(bool %cond) { +;