mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
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
This commit is contained in:
parent
84cda0f470
commit
870e587d5d
13
test/Transforms/CodeExtractor/loops-no-output.c
Normal file
13
test/Transforms/CodeExtractor/loops-no-output.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
|
||||
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;
|
||||
}
|
13
test/Transforms/CodeExtractor/loops-outputs.c
Normal file
13
test/Transforms/CodeExtractor/loops-outputs.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
|
||||
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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user