diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-22 19:43:45 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-22 19:43:45 +0000 |
| commit | aa803409c3bd3930126db630c29f63d42f255153 (patch) | |
| tree | 042106605c08352895ba4383ef97eae88b6b31aa /test/CodeGen | |
| parent | 1ce08792766261dcaa25d8215f9d1c2f70d7b7e9 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen')
| -rw-r--r-- | test/CodeGen/address-space.c | 8 | ||||
| -rw-r--r-- | test/CodeGen/micromips-attr.c | 12 | ||||
| -rw-r--r-- | test/CodeGen/wchar-size.c | 8 |
3 files changed, 25 insertions, 3 deletions
diff --git a/test/CodeGen/address-space.c b/test/CodeGen/address-space.c index 5d57d5b6ebe5..35e3dbdcfa73 100644 --- a/test/CodeGen/address-space.c +++ b/test/CodeGen/address-space.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm < %s | FileCheck -check-prefixes=CHECK,GIZ %s // RUN: %clang_cc1 -triple amdgcn -emit-llvm < %s | FileCheck -check-prefixes=CHECK,PIZ %s -// RUN: %clang_cc1 -triple amdgcn---amdgiz -emit-llvm < %s | FileCheck -check-prefixes=CHeCK,GIZ %s +// RUN: %clang_cc1 -triple amdgcn---amdgiz -emit-llvm < %s | FileCheck -check-prefixes=CHECK,GIZ %s // CHECK: @foo = common addrspace(1) global int foo __attribute__((address_space(1))); @@ -40,8 +40,10 @@ typedef struct { } MyStruct; // CHECK-LABEL: define void @test4( -// CHECK: call void @llvm.memcpy.p0i8.p2i8 -// CHECK: call void @llvm.memcpy.p2i8.p0i8 +// GIZ: call void @llvm.memcpy.p0i8.p2i8 +// GIZ: call void @llvm.memcpy.p2i8.p0i8 +// PIZ: call void @llvm.memcpy.p4i8.p2i8 +// PIZ: call void @llvm.memcpy.p2i8.p4i8 void test4(MyStruct __attribute__((address_space(2))) *pPtr) { MyStruct s = pPtr[0]; pPtr[0] = s; diff --git a/test/CodeGen/micromips-attr.c b/test/CodeGen/micromips-attr.c new file mode 100644 index 000000000000..96ba774afc0f --- /dev/null +++ b/test/CodeGen/micromips-attr.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s + +void __attribute__((micromips)) foo (void) {} + +// CHECK: define void @foo() [[MICROMIPS:#[0-9]+]] + +void __attribute__((nomicromips)) nofoo (void) {} + +// CHECK: define void @nofoo() [[NOMICROMIPS:#[0-9]+]] + +// CHECK: attributes [[MICROMIPS]] = { noinline nounwind {{.*}} "micromips" {{.*}} } +// CHECK: attributes [[NOMICROMIPS]] = { noinline nounwind {{.*}} "nomicromips" {{.*}} } diff --git a/test/CodeGen/wchar-size.c b/test/CodeGen/wchar-size.c new file mode 100644 index 000000000000..38da462d98cb --- /dev/null +++ b/test/CodeGen/wchar-size.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s -check-prefix=LONG-WCHAR +// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -emit-llvm -o - %s | FileCheck %s -check-prefix=SHORT-WCHAR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o - -fshort-wchar %s | FileCheck %s -check-prefix=SHORT-WCHAR +// Note: -fno-short-wchar implies the target default is used; so there is no +// need to test this separately here. + +// LONG-WCHAR: !{{[0-9]+}} = !{i32 {{[0-9]+}}, !"wchar_size", i32 4} +// SHORT-WCHAR: !{{[0-9]+}} = !{i32 {{[0-9]+}}, !"wchar_size", i32 2} |
