diff options
author | JF Bastien <jfbastien@apple.com> | 2018-08-08 17:05:17 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2018-08-08 17:05:17 +0000 |
commit | fe2ea8249d1a5bd7e2ee33c2517658d9462a7de7 (patch) | |
tree | 110c232e3388b0e20965a13c135e70d186f96e94 /clang/test/CodeGenCXX/auto-var-init.cpp | |
parent | 1df7059150a1f5e8c2681eb93c5904ab3f844096 (diff) | |
download | bcm5719-llvm-fe2ea8249d1a5bd7e2ee33c2517658d9462a7de7.tar.gz bcm5719-llvm-fe2ea8249d1a5bd7e2ee33c2517658d9462a7de7.zip |
CDDecl More automatic variable tail padding test
Test tail padded automatic variable at different width, because they encounter different codegen.
llvm-svn: 339273
Diffstat (limited to 'clang/test/CodeGenCXX/auto-var-init.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/auto-var-init.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/auto-var-init.cpp b/clang/test/CodeGenCXX/auto-var-init.cpp index 6f2929c687d..f9fe986ef6b 100644 --- a/clang/test/CodeGenCXX/auto-var-init.cpp +++ b/clang/test/CodeGenCXX/auto-var-init.cpp @@ -612,13 +612,32 @@ TEST_BRACES(tailpad4, tailpad[4]); // CHECK-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 16, i1 false) // CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) -TEST_CUSTOM(tailpad4, tailpad[4], { {17, 1}, {17, 1}, {17, 1}, {17, 1} }); +TEST_CUSTOM(tailpad4, tailpad[4], { {257, 1}, {257, 1}, {257, 1}, {257, 1} }); // CHECK-LABEL: @test_tailpad4_custom() // CHECK: %custom = alloca [4 x %struct.tailpad], align // CHECK-NEXT: bitcast // CHECK-NEXT: call void @llvm.memcpy // CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) +TEST_UNINIT(tailpad9, tailpad[9]); +// CHECK-LABEL: @test_tailpad9_uninit() +// CHECK: %uninit = alloca [9 x %struct.tailpad], align +// CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) + +TEST_BRACES(tailpad9, tailpad[9]); +// CHECK-LABEL: @test_tailpad9_braces() +// CHECK: %braces = alloca [9 x %struct.tailpad], align [[ALIGN:[0-9]*]] +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 36, i1 false) +// CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) + +TEST_CUSTOM(tailpad9, tailpad[9], { {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1} }); +// CHECK-LABEL: @test_tailpad9_custom() +// CHECK: %custom = alloca [9 x %struct.tailpad], align [[ALIGN:[0-9]*]] +// CHECK-NEXT: bitcast +// CHECK-NEXT: call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 1, i64 36, i1 false) +// CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) + TEST_UNINIT(atomicbool, _Atomic(bool)); // CHECK-LABEL: @test_atomicbool_uninit() |