diff options
author | JF Bastien <jfbastien@apple.com> | 2018-08-07 04:44:13 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2018-08-07 04:44:13 +0000 |
commit | 8137793a8fe185f8a355d675268af6b4be9a88fe (patch) | |
tree | 6424800cb13b940f84375deb8ab46c88d694eb84 /clang/test/CodeGenCXX/auto-var-init.cpp | |
parent | a9d477a6ddf24ac57b8ef089962fe4bd63f4c95a (diff) | |
download | bcm5719-llvm-8137793a8fe185f8a355d675268af6b4be9a88fe.tar.gz bcm5719-llvm-8137793a8fe185f8a355d675268af6b4be9a88fe.zip |
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.
llvm-svn: 339093
Diffstat (limited to 'clang/test/CodeGenCXX/auto-var-init.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/auto-var-init.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/clang/test/CodeGenCXX/auto-var-init.cpp b/clang/test/CodeGenCXX/auto-var-init.cpp index b1a07d867fb..f8656f0fd33 100644 --- a/clang/test/CodeGenCXX/auto-var-init.cpp +++ b/clang/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> <i64 3689348814741910323, i64 3689348814741910323, i64 3689348814741910323, i64 3689348814741910323>, <4 x i64>* %custom, align 16 +// CHECK: %custom = alloca <4 x i64>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x i64> <i64 3689348814741910323, i64 3689348814741910323, i64 3689348814741910323, i64 3689348814741910323>, <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> <float 0x400921FB60000000, float 0x400921FB60000000, float 0x400921FB60000000, float 0x400921FB60000000>, <4 x float>* %custom, align 16 +// CHECK: %custom = alloca <4 x float>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x float> <float 0x400921FB60000000, float 0x400921FB60000000, float 0x400921FB60000000, float 0x400921FB60000000>, <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> <double 0x400921FB54442D18, double 0x400921FB54442D18, double 0x400921FB54442D18, double 0x400921FB54442D18>, <4 x double>* %custom, align 16 +// CHECK: %custom = alloca <4 x double>, align [[ALIGN:[0-9]*]] +// CHECK-NEXT: store <4 x double> <double 0x400921FB54442D18, double 0x400921FB54442D18, double 0x400921FB54442D18, double 0x400921FB54442D18>, <4 x double>* %custom, align [[ALIGN]] // CHECK-NEXT: call void @{{.*}}used{{.*}}%custom) |