r339273 - CDDecl More automatic variable tail padding test
JF Bastien via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 8 10:05:17 PDT 2018
Author: jfb
Date: Wed Aug 8 10:05:17 2018
New Revision: 339273
URL: http://llvm.org/viewvc/llvm-project?rev=339273&view=rev
Log:
CDDecl More automatic variable tail padding test
Test tail padded automatic variable at different width, because they encounter different codegen.
Modified:
cfe/trunk/test/CodeGenCXX/auto-var-init.cpp
Modified: cfe/trunk/test/CodeGenCXX/auto-var-init.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/auto-var-init.cpp?rev=339273&r1=339272&r2=339273&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/auto-var-init.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/auto-var-init.cpp Wed Aug 8 10:05:17 2018
@@ -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()
More information about the cfe-commits
mailing list