diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2007-07-17 06:20:38 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2007-07-17 06:20:38 +0000 |
| commit | 5bc753e26b7973d5d4534b5a7d8c44b908aea7de (patch) | |
| tree | 4e0746a51dc7b50c76485fd5772286c27bde1c5b /llvm/test/CFrontend | |
| parent | 396156e00b3eb1e6b7541cf602b667b0e7028d63 (diff) | |
| download | bcm5719-llvm-5bc753e26b7973d5d4534b5a7d8c44b908aea7de.tar.gz bcm5719-llvm-5bc753e26b7973d5d4534b5a7d8c44b908aea7de.zip | |
For PR1558:
Move tests that have C/C++ sources into the appropriate directory. This
allows them to be selected for testing based on whether llvm-gcc is
present or not.
llvm-svn: 39963
Diffstat (limited to 'llvm/test/CFrontend')
| -rw-r--r-- | llvm/test/CFrontend/BasicInstrs.c | 26 | ||||
| -rw-r--r-- | llvm/test/CFrontend/funccall.c | 17 |
2 files changed, 43 insertions, 0 deletions
diff --git a/llvm/test/CFrontend/BasicInstrs.c b/llvm/test/CFrontend/BasicInstrs.c new file mode 100644 index 00000000000..812b49db28d --- /dev/null +++ b/llvm/test/CFrontend/BasicInstrs.c @@ -0,0 +1,26 @@ +// This file can be used to see what a native C compiler is generating for a +// variety of interesting operations. +// +// RUN: %llvmgcc -S %s -o - | llvm-as | llc + +unsigned int udiv(unsigned int X, unsigned int Y) { + return X/Y; +} +int sdiv(int X, int Y) { + return X/Y; +} +unsigned int urem(unsigned int X, unsigned int Y) { + return X%Y; +} +int srem(int X, int Y) { + return X%Y; +} + +_Bool setlt(int X, int Y) { + return X < Y; +} + +_Bool setgt(int X, int Y) { + return X > Y; +} + diff --git a/llvm/test/CFrontend/funccall.c b/llvm/test/CFrontend/funccall.c new file mode 100644 index 00000000000..9735e347057 --- /dev/null +++ b/llvm/test/CFrontend/funccall.c @@ -0,0 +1,17 @@ + +static int q; + +void foo() { + int t = q; + q = t + 1; +} +int main() { + q = 0; + foo(); + q = q - 1; + + return q; +} + +// This is the source that corresponds to funccall.ll +// RUN: echo foo |

