diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-27 00:06:04 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-27 00:06:04 +0000 |
commit | 899245792776dd219a3c36eb19b42272e270bc0c (patch) | |
tree | 6ac05a34d42c4b09361726b0125cb335297ee3ee /test/CodeGen | |
parent | deb8f5d533b7bcd962976ecdbc1464fe754b6de0 (diff) |
Reapply r176133 with testcase fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/address-safety-attr.cpp | 9 | ||||
-rw-r--r-- | test/CodeGen/function-attributes.c | 8 | ||||
-rw-r--r-- | test/CodeGen/libcalls.c | 33 | ||||
-rw-r--r-- | test/CodeGen/mips-vector-arg.c | 14 | ||||
-rw-r--r-- | test/CodeGen/sanitize-thread-attr.cpp | 9 | ||||
-rw-r--r-- | test/CodeGen/unwind-attr.c | 5 |
6 files changed, 33 insertions, 45 deletions
diff --git a/test/CodeGen/address-safety-attr.cpp b/test/CodeGen/address-safety-attr.cpp index c9f6ddcab4..29ba5a8375 100644 --- a/test/CodeGen/address-safety-attr.cpp +++ b/test/CodeGen/address-safety-attr.cpp @@ -47,15 +47,12 @@ int force_instance = TemplateAddressSafetyOk<42>() // Check that __cxx_global_var_init* get the sanitize_address attribute. int global1 = 0; int global2 = *(int*)((char*)&global1+1); -// WITHOUT: @__cxx_global_var_init{{.*}}#[[GVI:[0-9]+]] -// BL: @__cxx_global_var_init{{.*}}#[[GVI:[0-9]+]] -// ASAN: @__cxx_global_var_init{{.*}}#[[GVI:[0-9]+]] +// WITHOUT: @__cxx_global_var_init{{.*}}#[[NOATTR]] +// BL: @__cxx_global_var_init{{.*}}#[[NOATTR]] +// ASAN: @__cxx_global_var_init{{.*}}#[[WITH]] // WITHOUT: attributes #[[NOATTR]] = { nounwind{{.*}} } -// WITHOUT: attributes #[[GVI]] = { nounwind{{.*}} } // BL: attributes #[[NOATTR]] = { nounwind{{.*}} } -// BL: attributes #[[GVI]] = { nounwind{{.*}} } // ASAN: attributes #[[NOATTR]] = { nounwind{{.*}} } // ASAN: attributes #[[WITH]] = {{.*}}sanitize_address -// ASAN: attributes #[[GVI]] = {{.*}}sanitize_address diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c index 25ca9163a1..8ad00fa80d 100644 --- a/test/CodeGen/function-attributes.c +++ b/test/CodeGen/function-attributes.c @@ -43,7 +43,7 @@ void f9b(void) { f9a(); } // FIXME: We should be setting nounwind on calls. // CHECK: call i32 @f10_t() -// CHECK: [[NUW_RN:#[0-9]+]] +// CHECK: [[NUW]] // CHECK: { int __attribute__((const)) f10_t(void); int f10(void) { return f10_t(); } @@ -119,8 +119,6 @@ void f19(void) { // CHECK: attributes [[NUW]] = { nounwind optsize readnone{{.*}} } // CHECK: attributes [[AI]] = { alwaysinline nounwind optsize readnone{{.*}} } -// CHECK: attributes [[ALIGN]] = { nounwind optsize readnone alignstack=16{{.*}} } -// CHECK: attributes [[RT]] = { nounwind optsize returns_twice{{.*}} } // CHECK: attributes [[NR]] = { noreturn nounwind optsize } -// CHECK: attributes [[NUW_RN]] = { nounwind optsize readnone } -// CHECK: attributes [[RT_CALL]] = { nounwind optsize returns_twice } +// CHECK: attributes [[ALIGN]] = { nounwind optsize readnone alignstack=16{{.*}} } +// CHECK: attributes [[RT]] = { nounwind optsize returns_twice } diff --git a/test/CodeGen/libcalls.c b/test/CodeGen/libcalls.c index d882b0ef97..8f8e18226a 100644 --- a/test/CodeGen/libcalls.c +++ b/test/CodeGen/libcalls.c @@ -24,9 +24,9 @@ void test_sqrt(float a0, double a1, long double a2) { // CHECK-YES: declare float @sqrtf(float) // CHECK-YES: declare double @sqrt(double) // CHECK-YES: declare x86_fp80 @sqrtl(x86_fp80) -// CHECK-NO: declare float @sqrtf(float) [[NUW_RN1:#[0-9]+]] -// CHECK-NO: declare double @sqrt(double) [[NUW_RN1]] -// CHECK-NO: declare x86_fp80 @sqrtl(x86_fp80) [[NUW_RN1]] +// CHECK-NO: declare float @sqrtf(float) [[NUW_RN:#[0-9]+]] +// CHECK-NO: declare double @sqrt(double) [[NUW_RN]] +// CHECK-NO: declare x86_fp80 @sqrtl(x86_fp80) [[NUW_RN]] // CHECK-YES: define void @test_pow // CHECK-NO: define void @test_pow @@ -81,9 +81,9 @@ void test_builtins(double d, float f, long double ld) { double atan_ = atan(d); long double atanl_ = atanl(ld); float atanf_ = atanf(f); -// CHECK-NO: declare double @atan(double) [[NUW_RN1]] -// CHECK-NO: declare x86_fp80 @atanl(x86_fp80) [[NUW_RN1]] -// CHECK-NO: declare float @atanf(float) [[NUW_RN1]] +// CHECK-NO: declare double @atan(double) [[NUW_RN]] +// CHECK-NO: declare x86_fp80 @atanl(x86_fp80) [[NUW_RN]] +// CHECK-NO: declare float @atanf(float) [[NUW_RN]] // CHECK-YES-NOT: declare double @atan(double) [[NUW_RN]] // CHECK-YES-NOT: declare x86_fp80 @atanl(x86_fp80) [[NUW_RN]] // CHECK-YES-NOT: declare float @atanf(float) [[NUW_RN]] @@ -91,9 +91,9 @@ void test_builtins(double d, float f, long double ld) { double atan2_ = atan2(d, 2); long double atan2l_ = atan2l(ld, ld); float atan2f_ = atan2f(f, f); -// CHECK-NO: declare double @atan2(double, double) [[NUW_RN1]] -// CHECK-NO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[NUW_RN1]] -// CHECK-NO: declare float @atan2f(float, float) [[NUW_RN1]] +// CHECK-NO: declare double @atan2(double, double) [[NUW_RN]] +// CHECK-NO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[NUW_RN]] +// CHECK-NO: declare float @atan2f(float, float) [[NUW_RN]] // CHECK-YES-NOT: declare double @atan2(double, double) [[NUW_RN]] // CHECK-YES-NOT: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) [[NUW_RN]] // CHECK-YES-NOT: declare float @atan2f(float, float) [[NUW_RN]] @@ -101,9 +101,9 @@ void test_builtins(double d, float f, long double ld) { double exp_ = exp(d); long double expl_ = expl(ld); float expf_ = expf(f); -// CHECK-NO: declare double @exp(double) [[NUW_RN1]] -// CHECK-NO: declare x86_fp80 @expl(x86_fp80) [[NUW_RN1]] -// CHECK-NO: declare float @expf(float) [[NUW_RN1]] +// CHECK-NO: declare double @exp(double) [[NUW_RN]] +// CHECK-NO: declare x86_fp80 @expl(x86_fp80) [[NUW_RN]] +// CHECK-NO: declare float @expf(float) [[NUW_RN]] // CHECK-YES-NOT: declare double @exp(double) [[NUW_RN]] // CHECK-YES-NOT: declare x86_fp80 @expl(x86_fp80) [[NUW_RN]] // CHECK-YES-NOT: declare float @expf(float) [[NUW_RN]] @@ -111,9 +111,9 @@ void test_builtins(double d, float f, long double ld) { double log_ = log(d); long double logl_ = logl(ld); float logf_ = logf(f); -// CHECK-NO: declare double @log(double) [[NUW_RN1]] -// CHECK-NO: declare x86_fp80 @logl(x86_fp80) [[NUW_RN1]] -// CHECK-NO: declare float @logf(float) [[NUW_RN1]] +// CHECK-NO: declare double @log(double) [[NUW_RN]] +// CHECK-NO: declare x86_fp80 @logl(x86_fp80) [[NUW_RN]] +// CHECK-NO: declare float @logf(float) [[NUW_RN]] // CHECK-YES-NOT: declare double @log(double) [[NUW_RN]] // CHECK-YES-NOT: declare x86_fp80 @logl(x86_fp80) [[NUW_RN]] // CHECK-YES-NOT: declare float @logf(float) [[NUW_RN]] @@ -121,6 +121,5 @@ void test_builtins(double d, float f, long double ld) { // CHECK-YES: attributes [[NUW_RN]] = { nounwind readnone } -// CHECK-NO: attributes [[NUW_RN1]] = { nounwind readnone{{.*}} } +// CHECK-NO: attributes [[NUW_RN]] = { nounwind readnone{{.*}} } // CHECK-NO: attributes [[NUW_RO]] = { nounwind readonly } -// CHECK-NO: attributes [[NUW_RN2]] = { nounwind readnone } diff --git a/test/CodeGen/mips-vector-arg.c b/test/CodeGen/mips-vector-arg.c index 3202ebd630..6ffb043188 100644 --- a/test/CodeGen/mips-vector-arg.c +++ b/test/CodeGen/mips-vector-arg.c @@ -8,26 +8,24 @@ typedef float v4sf __attribute__ ((__vector_size__ (16))); typedef int v4i32 __attribute__ ((__vector_size__ (16))); -// O32: define void @test_v4sf(i32 %a1.coerce0, i32 %a1.coerce1, i32 %a1.coerce2, i32 %a1.coerce3, i32 %a2, i32, i32 %a3.coerce0, i32 %a3.coerce1, i32 %a3.coerce2, i32 %a3.coerce3) [[NUW1:#[0-9]+]] +// O32: define void @test_v4sf(i32 %a1.coerce0, i32 %a1.coerce1, i32 %a1.coerce2, i32 %a1.coerce3, i32 %a2, i32, i32 %a3.coerce0, i32 %a3.coerce1, i32 %a3.coerce2, i32 %a3.coerce3) [[NUW:#[0-9]+]] // O32: declare i32 @test_v4sf_2(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -// N64: define void @test_v4sf(i64 %a1.coerce0, i64 %a1.coerce1, i32 %a2, i64, i64 %a3.coerce0, i64 %a3.coerce1) [[NUW1:#[0-9]+]] +// N64: define void @test_v4sf(i64 %a1.coerce0, i64 %a1.coerce1, i32 %a2, i64, i64 %a3.coerce0, i64 %a3.coerce1) [[NUW:#[0-9]+]] // N64: declare i32 @test_v4sf_2(i64, i64, i32, i64, i64, i64) extern test_v4sf_2(v4sf, int, v4sf); void test_v4sf(v4sf a1, int a2, v4sf a3) { test_v4sf_2(a3, a2, a1); } -// O32: define void @test_v4i32(i32 %a1.coerce0, i32 %a1.coerce1, i32 %a1.coerce2, i32 %a1.coerce3, i32 %a2, i32, i32 %a3.coerce0, i32 %a3.coerce1, i32 %a3.coerce2, i32 %a3.coerce3) [[NUW2:#[0-9]+]] +// O32: define void @test_v4i32(i32 %a1.coerce0, i32 %a1.coerce1, i32 %a1.coerce2, i32 %a1.coerce3, i32 %a2, i32, i32 %a3.coerce0, i32 %a3.coerce1, i32 %a3.coerce2, i32 %a3.coerce3) [[NUW]] // O32: declare i32 @test_v4i32_2(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -// N64: define void @test_v4i32(i64 %a1.coerce0, i64 %a1.coerce1, i32 %a2, i64, i64 %a3.coerce0, i64 %a3.coerce1) [[NUW2:#[0-9]+]] +// N64: define void @test_v4i32(i64 %a1.coerce0, i64 %a1.coerce1, i32 %a2, i64, i64 %a3.coerce0, i64 %a3.coerce1) [[NUW]] // N64: declare i32 @test_v4i32_2(i64, i64, i32, i64, i64, i64) extern test_v4i32_2(v4i32, int, v4i32); void test_v4i32(v4i32 a1, int a2, v4i32 a3) { test_v4i32_2(a3, a2, a1); } -// O32: attributes [[NUW1]] = { nounwind{{.*}} } -// O32: attributes [[NUW2]] = { nounwind{{.*}} } +// O32: attributes [[NUW]] = { nounwind{{.*}} } -// N64: attributes [[NUW1]] = { nounwind{{.*}} } -// N64: attributes [[NUW2]] = { nounwind{{.*}} } +// N64: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGen/sanitize-thread-attr.cpp b/test/CodeGen/sanitize-thread-attr.cpp index 09f4db5750..2dec3c48c6 100644 --- a/test/CodeGen/sanitize-thread-attr.cpp +++ b/test/CodeGen/sanitize-thread-attr.cpp @@ -46,15 +46,12 @@ int force_instance = TemplateTSANOk<42>() // Check that __cxx_global_var_init* get the sanitize_thread attribute. int global1 = 0; int global2 = *(int*)((char*)&global1+1); -// WITHOUT: @__cxx_global_var_init{{.*}}#[[GVI:[0-9]+]] -// BL: @__cxx_global_var_init{{.*}}#[[GVI:[0-9]+]] -// TSAN: @__cxx_global_var_init{{.*}}#[[GVI:[0-9]+]] +// WITHOUT: @__cxx_global_var_init{{.*}}#[[NOATTR]] +// BL: @__cxx_global_var_init{{.*}}#[[NOATTR]] +// TSAN: @__cxx_global_var_init{{.*}}#[[WITH]] // WITHOUT: attributes #[[NOATTR]] = { nounwind{{.*}} } -// WITHOUT: attributes #[[GVI]] = { nounwind{{.*}} } // BL: attributes #[[NOATTR]] = { nounwind{{.*}} } -// BL: attributes #[[GVI]] = { nounwind{{.*}} } // TSAN: attributes #[[NOATTR]] = { nounwind{{.*}} } // TSAN: attributes #[[WITH]] = { nounwind{{.*}} sanitize_thread -// TSAN: attributes #[[GVI]] = { nounwind{{.*}} sanitize_thread diff --git a/test/CodeGen/unwind-attr.c b/test/CodeGen/unwind-attr.c index 2ffb5a8eeb..1a7d3cdd1c 100644 --- a/test/CodeGen/unwind-attr.c +++ b/test/CodeGen/unwind-attr.c @@ -3,7 +3,7 @@ int opaque(); -// CHECK: define [[INT:i.*]] @test0() [[NONE:#[0-9]+]] { +// CHECK: define [[INT:i.*]] @test0() { // CHECK-NOEXC: define [[INT:i.*]] @test0() [[NUW:#[0-9]+]] { int test0(void) { return opaque(); @@ -17,13 +17,12 @@ int test1(void) { } // <rdar://problem/8283071>: not for weak functions -// CHECK: define weak [[INT:i.*]] @test2() [[NONE]] { +// CHECK: define weak [[INT:i.*]] @test2() { // CHECK-NOEXC: define weak [[INT:i.*]] @test2() [[NUW]] { __attribute__((weak)) int test2(void) { return 0; } -// CHECK: attributes [[NONE]] = { {{.*}} } // CHECK: attributes [[NUW]] = { nounwind{{.*}} } // CHECK-NOEXC: attributes [[NUW]] = { nounwind{{.*}} } |