From: JF Bastien Date: Tue, 7 Aug 2018 04:44:13 +0000 (+0000) Subject: Auto var init test fix #2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c629b8b2488674d29bb5f964c162641b6f0a82ec;p=clang Auto var init test fix #2 It turns out that the AVX bots have different alignment for their vectors, and my test mistakenly assumed a particular vector alignent on the stack. Instead, capture the alignment and test for it in subsequent operations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339093 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenCXX/auto-var-init.cpp b/test/CodeGenCXX/auto-var-init.cpp index b1a07d867f..f8656f0fd3 100644 --- a/test/CodeGenCXX/auto-var-init.cpp +++ b/test/CodeGenCXX/auto-var-init.cpp @@ -946,53 +946,53 @@ TEST_BRACES(intvec16, int __attribute__((vector_size(16)))); TEST_UNINIT(longlongvec32, long long __attribute__((vector_size(32)))); // CHECK-LABEL: @test_longlongvec32_uninit() -// CHECK: %uninit = alloca <4 x i64>, align 16 +// CHECK: %uninit = alloca <4 x i64>, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) TEST_BRACES(longlongvec32, long long __attribute__((vector_size(32)))); // CHECK-LABEL: @test_longlongvec32_braces() -// CHECK: %braces = alloca <4 x i64>, align 16 -// CHECK-NEXT: store <4 x i64> zeroinitializer, <4 x i64>* %braces, align 16 +// CHECK: %braces = alloca <4 x i64>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x i64> zeroinitializer, <4 x i64>* %braces, align [[ALIGN]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) TEST_CUSTOM(longlongvec32, long long __attribute__((vector_size(32))), { 0x3333333333333333, 0x3333333333333333, 0x3333333333333333, 0x3333333333333333 }); // CHECK-LABEL: @test_longlongvec32_custom() -// CHECK: %custom = alloca <4 x i64>, align 16 -// CHECK-NEXT: store <4 x i64> , <4 x i64>* %custom, align 16 +// CHECK: %custom = alloca <4 x i64>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x i64> , <4 x i64>* %custom, align [[ALIGN]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) TEST_UNINIT(floatvec16, float __attribute__((vector_size(16)))); // CHECK-LABEL: @test_floatvec16_uninit() -// CHECK: %uninit = alloca <4 x float>, align 16 +// CHECK: %uninit = alloca <4 x float>, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) TEST_BRACES(floatvec16, float __attribute__((vector_size(16)))); // CHECK-LABEL: @test_floatvec16_braces() -// CHECK: %braces = alloca <4 x float>, align 16 -// CHECK-NEXT: store <4 x float> zeroinitializer, <4 x float>* %braces, align 16 +// CHECK: %braces = alloca <4 x float>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x float> zeroinitializer, <4 x float>* %braces, align [[ALIGN]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) TEST_CUSTOM(floatvec16, float __attribute__((vector_size(16))), { 3.1415926535897932384626433, 3.1415926535897932384626433, 3.1415926535897932384626433, 3.1415926535897932384626433 }); // CHECK-LABEL: @test_floatvec16_custom() -// CHECK: %custom = alloca <4 x float>, align 16 -// CHECK-NEXT: store <4 x float> , <4 x float>* %custom, align 16 +// CHECK: %custom = alloca <4 x float>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x float> , <4 x float>* %custom, align [[ALIGN]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) TEST_UNINIT(doublevec32, double __attribute__((vector_size(32)))); // CHECK-LABEL: @test_doublevec32_uninit() -// CHECK: %uninit = alloca <4 x double>, align 16 +// CHECK: %uninit = alloca <4 x double>, align // CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit) TEST_BRACES(doublevec32, double __attribute__((vector_size(32)))); // CHECK-LABEL: @test_doublevec32_braces() -// CHECK: %braces = alloca <4 x double>, align 16 -// CHECK-NEXT: store <4 x double> zeroinitializer, <4 x double>* %braces, align 16 +// CHECK: %braces = alloca <4 x double>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x double> zeroinitializer, <4 x double>* %braces, align [[ALIGN]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%braces) TEST_CUSTOM(doublevec32, double __attribute__((vector_size(32))), { 3.1415926535897932384626433, 3.1415926535897932384626433, 3.1415926535897932384626433, 3.1415926535897932384626433 }); // CHECK-LABEL: @test_doublevec32_custom() -// CHECK: %custom = alloca <4 x double>, align 16 -// CHECK-NEXT: store <4 x double> , <4 x double>* %custom, align 16 +// CHECK: %custom = alloca <4 x double>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x double> , <4 x double>* %custom, align [[ALIGN]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%custom)