diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-09-05 00:57:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-09-05 00:57:45 +0000 |
commit | 3a9a3e112ac02f8a261293cbe605db2e5d8732d3 (patch) | |
tree | 621f5da691905087929eb9287cfbe85b5311604d /test/CodeGen/function-attributes.c | |
parent | fc0898a6529f3d6bc9a4effdb3202aee13170fe3 (diff) |
Set sext/zext on function result.
- <rdar://problem/6156739>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/function-attributes.c')
-rw-r--r-- | test/CodeGen/function-attributes.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c new file mode 100644 index 0000000000..bb482a043d --- /dev/null +++ b/test/CodeGen/function-attributes.c @@ -0,0 +1,22 @@ +// RUN: clang -emit-llvm -o %t.clang.ll %s && +// RUN: %llvmgcc -c --emit-llvm -o - %s | llvm-dis -f -o %t.gcc.ll && +// RUN: grep "define" %t.clang.ll | sort > %t.clang.defs && +// RUN: grep "define" %t.gcc.ll | sort > %t.gcc.defs && +// RUN: diff %t.clang.defs %t.gcc.defs + +signed char f0(int x) { return x; } + +unsigned char f1(int x) { return x; } + +void f2(signed char x) { } + +void f3(unsigned char x) { } + +signed short f4(int x) { return x; } + +unsigned short f5(int x) { return x; } + +void f6(signed short x) { } + +void f7(unsigned short x) { } + |