From: Christophe Lyon Date: Thu, 18 Mar 2021 14:02:53 +0000 (+0000) Subject: testsuite/arm: Add arm_v8_2a_fp16_neon and arm_v8_2a_bf16_neon options X-Git-Tag: basepoints/gcc-12~466 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c0351f287e1fdf9a085c499f4657a6501c6cf29;p=thirdparty%2Fgcc.git testsuite/arm: Add arm_v8_2a_fp16_neon and arm_v8_2a_bf16_neon options A few tests lack the dg-add-options directives associated with the dg-require-effective-target they are using. Adding them enables to pass the right float-abi option, and thus make the tests pass instead of emit an error. For instance, we now pass -mfloat-abi=softfp on arm-linux-gnueabi targets and the tests pass. 2021-03-19 Christophe Lyon gcc/testsuite/ * gcc.target/arm/bfloat16_scalar_typecheck.c: Add arm_v8_2a_fp16_neon and arm_v8_2a_bf16_neon. * gcc.target/arm/bfloat16_vector_typecheck_1.c: Likewise. * gcc.target/arm/bfloat16_vector_typecheck_2.c: Likewise. --- diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c b/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c index 672641e66303..8c80c55bc9f4 100644 --- a/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c +++ b/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c @@ -2,6 +2,8 @@ /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } } */ /* { dg-require-effective-target arm_v8_2a_fp16_neon_ok } */ /* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */ +/* { dg-add-options arm_v8_2a_fp16_neon } */ +/* { dg-add-options arm_v8_2a_bf16_neon } */ /* { dg-additional-options "-march=armv8.6-a+bf16+fp16 -Wno-pedantic -O3 --save-temps" } */ #include diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c index ba39cb6bcd3f..f3c350b4cfc7 100644 --- a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c +++ b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c @@ -2,6 +2,8 @@ /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } } */ /* { dg-require-effective-target arm_v8_2a_fp16_neon_ok } */ /* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */ +/* { dg-add-options arm_v8_2a_fp16_neon } */ +/* { dg-add-options arm_v8_2a_bf16_neon } */ /* { dg-additional-options "-march=armv8.6-a+bf16+fp16 -Wno-pedantic -O3 --save-temps" } */ #include diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c index 16669dcf0098..de0ade52c102 100644 --- a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c +++ b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c @@ -2,6 +2,8 @@ /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } } */ /* { dg-require-effective-target arm_v8_2a_fp16_neon_ok } */ /* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */ +/* { dg-add-options arm_v8_2a_fp16_neon } */ +/* { dg-add-options arm_v8_2a_bf16_neon } */ /* { dg-additional-options "-march=armv8.6-a+bf16+fp16 -Wno-pedantic -O3 --save-temps" } */ #include @@ -25,8 +27,8 @@ float is_a_float16; double is_a_double; bfloat16x8_t foo3 (void) { return (bfloat16x8_t) 0x12345678123456781234567812345678; } - /* { dg-error {integer constant is too large for its type} "" {target *-*-*} 27 } */ - /* { dg-error {cannot convert a value of type 'long long int' to vector type '__simd128_bfloat16_t' which has different size} "" {target *-*-*} 27 } */ + /* { dg-error {integer constant is too large for its type} "" {target *-*-*} .-1 } */ + /* { dg-error {cannot convert a value of type 'long long int' to vector type '__simd128_bfloat16_t' which has different size} "" {target *-*-*} .-2 } */ bfloat16x8_t footest (bfloat16x8_t vector0) {