From 870e587d5d8b5f9005e0e42e19120fe6f21c1c35 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Sat, 28 Feb 2004 03:20:41 +0000 Subject: [PATCH] Two testcases for loops: one with outputs, one without. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11934 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/CodeExtractor/loops-no-output.c | 13 +++++++++++++ test/Transforms/CodeExtractor/loops-outputs.c | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/Transforms/CodeExtractor/loops-no-output.c create mode 100644 test/Transforms/CodeExtractor/loops-outputs.c diff --git a/test/Transforms/CodeExtractor/loops-no-output.c b/test/Transforms/CodeExtractor/loops-no-output.c new file mode 100644 index 00000000000..5f96c04cb1e --- /dev/null +++ b/test/Transforms/CodeExtractor/loops-no-output.c @@ -0,0 +1,13 @@ +#include + +int main(int argc, char *argv[]) { + int i; + for (i=0; i < 5; ++i) + printf("%d\n", i); + + printf("separator!\n"); + + for (i=0; i < 4; ++i) + printf("[%d]\n", i+5); + return 0; +} diff --git a/test/Transforms/CodeExtractor/loops-outputs.c b/test/Transforms/CodeExtractor/loops-outputs.c new file mode 100644 index 00000000000..43bb0de668b --- /dev/null +++ b/test/Transforms/CodeExtractor/loops-outputs.c @@ -0,0 +1,13 @@ +#include + +int main(int argc, char *argv[]) { + int i, d=0; + for (i=0; i < 10; ++i) + d += i; + + printf("separator!\n"); + + for (i=0; i < 4; ++i) + printf("[%d]\n", d+i); + return 0; +}