diff options
Diffstat (limited to 'gcc/testsuite/gcc.target')
105 files changed, 953 insertions, 141 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/ccmp_1.c b/gcc/testsuite/gcc.target/aarch64/ccmp_1.c index 7c39b61a585..7c962cbb396 100644 --- a/gcc/testsuite/gcc.target/aarch64/ccmp_1.c +++ b/gcc/testsuite/gcc.target/aarch64/ccmp_1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -ffinite-math-only" } */ int f1 (int a) @@ -85,7 +85,7 @@ f13 (int a, int b) /* { dg-final { scan-assembler "cmp\t(.)+34" } } */ /* { dg-final { scan-assembler "cmp\t(.)+35" } } */ -/* { dg-final { scan-assembler-times "\tcmp\tw\[0-9\]+, 0" 4 } } */ +/* { dg-final { scan-assembler-times "\tcmp\tw\[0-9\]+, (0|wzr)" 4 } } */ /* { dg-final { scan-assembler-times "fcmpe\t(.)+0\\.0" 2 } } */ /* { dg-final { scan-assembler-times "fcmp\t(.)+0\\.0" 2 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/pr68674.c b/gcc/testsuite/gcc.target/aarch64/pr68674.c new file mode 100644 index 00000000000..c8acce3b46b --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr68674.c @@ -0,0 +1,22 @@ +/* PR target/68674 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -mcpu=generic+nosimd" } */ + +#include <arm_neon.h> + +int8x8_t a; +extern int8x8_t b; +int16x8_t e; + +void __attribute__((target("+simd"))) +foo1(void) +{ + e = (int16x8_t) vaddl_s8(a, b); +} + +int8x8_t __attribute__((target("+simd"))) +foo2(void) +{ + return a; +} + diff --git a/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C b/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C new file mode 100644 index 00000000000..1f916e09f4f --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C @@ -0,0 +1,7 @@ +typedef __Poly8_t A; +typedef __Poly16_t A; /* { dg-error "conflicting declaration" } */ +typedef __Poly64_t A; /* { dg-error "conflicting declaration" } */ +typedef __Poly128_t A; /* { dg-error "conflicting declaration" } */ + +typedef __Poly8x8_t B; +typedef __Poly16x8_t B; /* { dg-error "conflicting declaration" } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvt_s64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvt_s64_f64_1.c new file mode 100644 index 00000000000..02f59fc7e58 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvt_s64_f64_1.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + int64x1_t b1 = vcvt_s64_f64 (a); + + if (b1[0] != 0) + abort (); + + volatile float64x1_t a2 = {-0.5}; + int64x1_t b2 = vcvt_s64_f64 (a2); + + if (b2[0] != 0) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtzs\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvt_u64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvt_u64_f64_1.c new file mode 100644 index 00000000000..089cc793a37 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvt_u64_f64_1.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + uint64x1_t b1 = vcvt_u64_f64 (a); + + if (b1[0] != 0) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtzu\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvta_s64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvta_s64_f64_1.c new file mode 100644 index 00000000000..d5cd5bb7736 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvta_s64_f64_1.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + int64x1_t b1 = vcvta_s64_f64 (a); + + if (b1[0] != 1) + abort (); + + volatile float64x1_t a2 = {-0.5}; + int64x1_t b2 = vcvta_s64_f64 (a2); + + if (b2[0] != -1) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtas\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvta_u64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvta_u64_f64_1.c new file mode 100644 index 00000000000..aaddfa0604c --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvta_u64_f64_1.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + uint64x1_t b1 = vcvta_u64_f64 (a); + + if (b1[0] != 1) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtau\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvtm_s64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvtm_s64_f64_1.c new file mode 100644 index 00000000000..a24b737dc3f --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvtm_s64_f64_1.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + int64x1_t b1 = vcvtm_s64_f64 (a); + + if (b1[0] != 0) + abort (); + + volatile float64x1_t a2 = {-0.5}; + int64x1_t b2 = vcvtm_s64_f64 (a2); + + if (b2[0] != -1) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtms\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvtm_u64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvtm_u64_f64_1.c new file mode 100644 index 00000000000..0f2751cf29b --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvtm_u64_f64_1.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + uint64x1_t b1 = vcvtm_u64_f64 (a); + + if (b1[0] != 0) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtmu\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvtn_s64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvtn_s64_f64_1.c new file mode 100644 index 00000000000..4a312db906a --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvtn_s64_f64_1.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + int64x1_t b1 = vcvtn_s64_f64 (a); + + if (b1[0] != 0) + abort (); + + volatile float64x1_t a2 = {-0.5}; + int64x1_t b2 = vcvtn_s64_f64 (a2); + + if (b2[0] != 0) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtns\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvtn_u64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvtn_u64_f64_1.c new file mode 100644 index 00000000000..823834c72ef --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvtn_u64_f64_1.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + uint64x1_t b1 = vcvtn_u64_f64 (a); + + if (b1[0] != 0) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtnu\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvtp_s64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvtp_s64_f64_1.c new file mode 100644 index 00000000000..3ff80e292c9 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvtp_s64_f64_1.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + int64x1_t b1 = vcvtp_s64_f64 (a); + + if (b1[0] != 1) + abort (); + + volatile float64x1_t a2 = {-0.5}; + int64x1_t b2 = vcvtp_s64_f64 (a2); + + if (b2[0] != 0) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtps\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vcvtp_u64_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vcvtp_u64_f64_1.c new file mode 100644 index 00000000000..6346ce5e6b3 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/vcvtp_u64_f64_1.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-save-temps -O3" } */ + +#include "arm_neon.h" + +extern void abort (); + +int +main() +{ + volatile float64x1_t a = {0.5}; + uint64x1_t b1 = vcvtp_u64_f64 (a); + + if (b1[0] != 1) + abort (); + + return 0; +} +/* { dg-final { scan-assembler "fcvtpu\[ \t\]+\[xX\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/tst_3.c b/gcc/testsuite/gcc.target/aarch64/tst_3.c index 2204b33f3bc..3fea63357eb 100644 --- a/gcc/testsuite/gcc.target/aarch64/tst_3.c +++ b/gcc/testsuite/gcc.target/aarch64/tst_3.c @@ -9,4 +9,4 @@ f1 (int x) return x; } -/* { dg-final { scan-assembler "tst\t(x|w)\[0-9\]*.*1" } } */ +/* { dg-final { scan-assembler "(tst|ands)\t(x|w)\[0-9\]*.*1" } } */ diff --git a/gcc/testsuite/gcc.target/arm/attr-crypto.c b/gcc/testsuite/gcc.target/arm/attr-crypto.c index 1db598447cd..af774cdaf59 100644 --- a/gcc/testsuite/gcc.target/arm/attr-crypto.c +++ b/gcc/testsuite/gcc.target/arm/attr-crypto.c @@ -1,6 +1,13 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_crypto_ok } */ -/* { dg-options "-O2 -mfloat-abi=softfp" } */ +/* Make sure we can force fpu=vfp before switching using the + pragma. */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-O2 -march=armv8-a" } */ +/* { dg-add-options arm_fp } */ + +/* Reset fpu to a value compatible with the next pragmas. */ +#pragma GCC target ("fpu=vfp") +#pragma GCC push_options #pragma GCC target ("fpu=crypto-neon-fp-armv8") @@ -28,7 +35,7 @@ foo (void) return res[0]; } -#pragma GCC reset_options +#pragma GCC pop_options /* Check that the FP version is correctly reset. */ diff --git a/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c b/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c index 6ac32fca166..05dc579f25d 100644 --- a/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c +++ b/gcc/testsuite/gcc.target/arm/attr-neon-builtin-fail.c @@ -1,7 +1,9 @@ /* Check that calling a neon builtin from a function compiled with vfp fails. */ /* { dg-do compile } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-require-effective-target arm_neon_ok } */ -/* { dg-options "-O2 -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ #include <arm_neon.h> @@ -12,6 +14,5 @@ foo (uint8x16_t *p) *p = vmovq_n_u8 (3); /* { dg-message "called from here" } */ } -/* { dg-error "inlining failed in call to always_inline" "" { target *-*-* } 0 } - */ +/* { dg-error "inlining failed in call to always_inline" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c b/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c index 3cf8918d724..984992f2ab0 100644 --- a/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c +++ b/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_neon_ok } */ -/* { dg-options "-mfp16-format=ieee -mfloat-abi=softfp" } */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-mfp16-format=ieee" } */ +/* { dg-add-options arm_fp } */ #include "arm_neon.h" diff --git a/gcc/testsuite/gcc.target/arm/attr-neon2.c b/gcc/testsuite/gcc.target/arm/attr-neon2.c index 819fad4ce62..29668256cf5 100644 --- a/gcc/testsuite/gcc.target/arm/attr-neon2.c +++ b/gcc/testsuite/gcc.target/arm/attr-neon2.c @@ -1,6 +1,12 @@ /* { dg-do compile } */ /* { dg-require-effective-target arm_neon_ok } */ -/* { dg-options "-O2 -mfloat-abi=softfp -mfpu=vfp" } */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ + +/* Reset fpu to a value compatible with the next pragmas. */ +#pragma GCC target ("fpu=vfp") +#pragma GCC push_options #pragma GCC target ("fpu=neon") #include <arm_neon.h> @@ -12,7 +18,7 @@ my (int8x8_t __a, int8x8_t __b) return __a + __b; } -#pragma GCC reset_options +#pragma GCC pop_options /* Check that command line option is restored. */ int8x8_t diff --git a/gcc/testsuite/gcc.target/arm/attr-neon3.c b/gcc/testsuite/gcc.target/arm/attr-neon3.c index 30a14790d08..17e429ad739 100644 --- a/gcc/testsuite/gcc.target/arm/attr-neon3.c +++ b/gcc/testsuite/gcc.target/arm/attr-neon3.c @@ -1,6 +1,12 @@ /* { dg-do compile } */ /* { dg-require-effective-target arm_crypto_ok } */ -/* { dg-options "-O2 -mfloat-abi=softfp -mfpu=vfp" } */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ + +/* Reset fpu to a value compatible with the next pragmas. */ +#pragma GCC target ("fpu=vfp") +#pragma GCC push_options #include <arm_neon.h> diff --git a/gcc/testsuite/gcc.target/arm/cmp-2.c b/gcc/testsuite/gcc.target/arm/cmp-2.c index ed6b609ca86..70e45091c0c 100644 --- a/gcc/testsuite/gcc.target/arm/cmp-2.c +++ b/gcc/testsuite/gcc.target/arm/cmp-2.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O" } */ +/* { dg-add-options arm_fp } */ /* { dg-final { scan-assembler-not "\tbl\t" } } */ /* { dg-final { scan-assembler-not "__aeabi" } } */ int x, y; diff --git a/gcc/testsuite/gcc.target/arm/pr67989.C b/gcc/testsuite/gcc.target/arm/pr67989.C new file mode 100644 index 00000000000..0006924e24f --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr67989.C @@ -0,0 +1,82 @@ +/* { dg-do compile } */ +/* { dg-options "-std=c++11 -O2" } */ +/* { dg-require-effective-target arm_arch_v4t_ok } */ +/* { dg-add-options arm_arch_v4t } */ +/* { dg-additional-options "-marm" } */ + +/* Duplicate version of the test in g++.dg to be able to run this test only if + ARMv4t in ARM execution state can be targetted. Newer architecture don't + expose the bug this testcase was written for. */ + + +__extension__ typedef unsigned long long int uint64_t; +namespace std __attribute__ ((__visibility__ ("default"))) +{ + typedef enum memory_order + { + memory_order_seq_cst + } memory_order; +} + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template < typename _Tp > struct atomic + { + static constexpr int _S_min_alignment + = (sizeof (_Tp) & (sizeof (_Tp) - 1)) || sizeof (_Tp) > 16 + ? 0 : sizeof (_Tp); + static constexpr int _S_alignment + = _S_min_alignment > alignof (_Tp) ? _S_min_alignment : alignof (_Tp); + alignas (_S_alignment) _Tp _M_i; + operator _Tp () const noexcept + { + return load (); + } + _Tp load (memory_order __m = memory_order_seq_cst) const noexcept + { + _Tp tmp; + __atomic_load (&_M_i, &tmp, __m); + } + }; +} + +namespace lldb_private +{ + namespace imp + { + } + class Address; +} +namespace lldb +{ + typedef uint64_t addr_t; + class SBSection + { + }; + class SBAddress + { + void SetAddress (lldb::SBSection section, lldb::addr_t offset); + lldb_private::Address & ref (); + }; +} +namespace lldb_private +{ + class Address + { + public: + const Address & SetOffset (lldb::addr_t offset) + { + bool changed = m_offset != offset; + } + std::atomic < lldb::addr_t > m_offset; + }; +} + +using namespace lldb; +using namespace lldb_private; +void +SBAddress::SetAddress (lldb::SBSection section, lldb::addr_t offset) +{ + Address & addr = ref (); + addr.SetOffset (offset); +} diff --git a/gcc/testsuite/gcc.target/arm/pr68620.c b/gcc/testsuite/gcc.target/arm/pr68620.c new file mode 100644 index 00000000000..984992f2ab0 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr68620.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-mfp16-format=ieee" } */ +/* { dg-add-options arm_fp } */ + +#include "arm_neon.h" + +float16x4_t __attribute__((target("fpu=neon-fp16"))) +foo (float32x4_t arg) +{ + return vcvt_f16_f32 (arg); +} diff --git a/gcc/testsuite/gcc.target/arm/pr68674.c b/gcc/testsuite/gcc.target/arm/pr68674.c new file mode 100644 index 00000000000..0b3237458fe --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr68674.c @@ -0,0 +1,28 @@ +/* PR target/68674 */ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_neon_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ + +#pragma GCC target ("fpu=vfp") + +#include <arm_neon.h> + +int8x8_t a; +extern int8x8_t b; +int16x8_t e; + +void __attribute__((target("fpu=neon"))) +foo1(void) +{ + e = (int16x8_t) vaddl_s8(a, b); +} + +int8x8_t __attribute__((target("fpu=neon"))) +foo2(void) +{ + return b; +} + + diff --git a/gcc/testsuite/gcc.target/arm/pr69187.c b/gcc/testsuite/gcc.target/arm/pr69187.c new file mode 100644 index 00000000000..9992a6954b1 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr69187.c @@ -0,0 +1,19 @@ +/* PR target/69187 */ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_neon } */ +/* { dg-options "-O0" } */ +/* { dg-add-options arm_neon } */ + +#include <arm_neon.h> + +int32x4_t +foo (void) +{ + int32x4_t vector_int32x4; + int16x4_t vector3_int16x4; + int16x4_t vector4_int16x4; + static int32_t buffer_int32x4[32]; + + vector_int32x4 = vld1q_s32(buffer_int32x4); + return vqdmlsl_lane_s16(vector_int32x4, vector3_int16x4, vector4_int16x4, 0); +} diff --git a/gcc/testsuite/gcc.target/arm/pr69245.c b/gcc/testsuite/gcc.target/arm/pr69245.c new file mode 100644 index 00000000000..bd505187728 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr69245.c @@ -0,0 +1,26 @@ +/* PR target/69245 */ +/* Test that pop_options restores the vfp fpu mode. */ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_neon_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ + +#pragma GCC target "fpu=vfp" + +#pragma GCC push_options +#pragma GCC target "fpu=neon-vfpv4" +int a, c, d; +float b; +static int fn1 () +{ + return 0; +} +#pragma GCC pop_options + +void fn2 () +{ + d = b * c + a; +} + +/* { dg-final { scan-assembler-times "\.fpu vfp" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/unsigned-float.c b/gcc/testsuite/gcc.target/arm/unsigned-float.c index b9ed6811bfb..e1cda0ce9e2 100644 --- a/gcc/testsuite/gcc.target/arm/unsigned-float.c +++ b/gcc/testsuite/gcc.target/arm/unsigned-float.c @@ -1,8 +1,9 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ /* { dg-options "-march=armv7-a -O1" } */ -/* { dg-additional-options "-mfloat-abi=softfp" { target { ! { arm_hf_eabi } } } } */ +/* { dg-add-options arm_fp } */ + #include <stdint.h> diff --git a/gcc/testsuite/gcc.target/arm/vfp-1.c b/gcc/testsuite/gcc.target/arm/vfp-1.c index 9aa53024038..7add1b869ea 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-1.c +++ b/gcc/testsuite/gcc.target/arm/vfp-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp -ffp-contract=off" } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ +/* { dg-options "-O2 -ffp-contract=off" } */ +/* { dg-add-options arm_fp } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ extern float fabsf (float); diff --git a/gcc/testsuite/gcc.target/arm/vfp-ldmdbd.c b/gcc/testsuite/gcc.target/arm/vfp-ldmdbd.c index 704157979aa..3489a2a9e25 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-ldmdbd.c +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmdbd.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ extern void bar (double); diff --git a/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c b/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c index 0187c01606c..8fda4059c3b 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ extern void bar (float); diff --git a/gcc/testsuite/gcc.target/arm/vfp-ldmiad.c b/gcc/testsuite/gcc.target/arm/vfp-ldmiad.c index 9c22f1f463c..422e3ed602b 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-ldmiad.c +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmiad.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ extern void bar (double); diff --git a/gcc/testsuite/gcc.target/arm/vfp-ldmias.c b/gcc/testsuite/gcc.target/arm/vfp-ldmias.c index 92051fd1827..31d2ee17577 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-ldmias.c +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmias.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ extern void bar (float); diff --git a/gcc/testsuite/gcc.target/arm/vfp-stmdbd.c b/gcc/testsuite/gcc.target/arm/vfp-stmdbd.c index 53383b5cf0a..686fe86392b 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-stmdbd.c +++ b/gcc/testsuite/gcc.target/arm/vfp-stmdbd.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ void foo (double *p, double a, double b, int n) diff --git a/gcc/testsuite/gcc.target/arm/vfp-stmdbs.c b/gcc/testsuite/gcc.target/arm/vfp-stmdbs.c index 6570defa71e..dbb30ecd6bc 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-stmdbs.c +++ b/gcc/testsuite/gcc.target/arm/vfp-stmdbs.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ void foo (float *p, float a, float b, int n) diff --git a/gcc/testsuite/gcc.target/arm/vfp-stmiad.c b/gcc/testsuite/gcc.target/arm/vfp-stmiad.c index 28e9d73b3f6..665fa7a124b 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-stmiad.c +++ b/gcc/testsuite/gcc.target/arm/vfp-stmiad.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ void foo (double *p, double a, double b, int n) diff --git a/gcc/testsuite/gcc.target/arm/vfp-stmias.c b/gcc/testsuite/gcc.target/arm/vfp-stmias.c index efa5fbe57f6..90940e5c8fe 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-stmias.c +++ b/gcc/testsuite/gcc.target/arm/vfp-stmias.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_fp } */ void foo (float *p, float a, float b, int n) diff --git a/gcc/testsuite/gcc.target/arm/vnmul-1.c b/gcc/testsuite/gcc.target/arm/vnmul-1.c index af0bebed204..fd00388a539 100644 --- a/gcc/testsuite/gcc.target/arm/vnmul-1.c +++ b/gcc/testsuite/gcc.target/arm/vnmul-1.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -fno-rounding-math -mfpu=vfp -mfloat-abi=hard" } */ +/* { dg-options "-O2 -fno-rounding-math" } */ +/* { dg-add-options arm_fp } */ double foo_d (double a, double b) diff --git a/gcc/testsuite/gcc.target/arm/vnmul-2.c b/gcc/testsuite/gcc.target/arm/vnmul-2.c index 909b2a44a79..c299ec115f5 100644 --- a/gcc/testsuite/gcc.target/arm/vnmul-2.c +++ b/gcc/testsuite/gcc.target/arm/vnmul-2.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -frounding-math -mfpu=vfp -mfloat-abi=hard" } */ +/* { dg-options "-O2 -frounding-math" } */ +/* { dg-add-options arm_fp } */ double foo_d (double a, double b) diff --git a/gcc/testsuite/gcc.target/arm/vnmul-3.c b/gcc/testsuite/gcc.target/arm/vnmul-3.c index df028823eea..44c1967ee7b 100644 --- a/gcc/testsuite/gcc.target/arm/vnmul-3.c +++ b/gcc/testsuite/gcc.target/arm/vnmul-3.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -fno-rounding-math -mfpu=vfp -mfloat-abi=hard" } */ +/* { dg-options "-O2 -fno-rounding-math" } */ +/* { dg-add-options arm_fp } */ double foo_d (double a, double b) diff --git a/gcc/testsuite/gcc.target/arm/vnmul-4.c b/gcc/testsuite/gcc.target/arm/vnmul-4.c index 670ee40e0c8..dd9cab3c727 100644 --- a/gcc/testsuite/gcc.target/arm/vnmul-4.c +++ b/gcc/testsuite/gcc.target/arm/vnmul-4.c @@ -1,7 +1,8 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ -/* { dg-options "-O2 -frounding-math -mfpu=vfp -mfloat-abi=hard" } */ +/* { dg-options "-O2 -frounding-math" } */ +/* { dg-add-options arm_fp } */ double foo_d (double a, double b) diff --git a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c b/gcc/testsuite/gcc.target/i386/chkp-always_inline.c index 26e80fe1975..c10d1310e0e 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c +++ b/gcc/testsuite/gcc.target/i386/chkp-always_inline.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wno-attributes" } */ static __attribute__((always_inline)) int f1 (int *p) diff --git a/gcc/testsuite/gcc.target/i386/chkp-bndret.c b/gcc/testsuite/gcc.target/i386/chkp-bndret.c index e1f5cea5c17..d84ea70dcda 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-bndret.c +++ b/gcc/testsuite/gcc.target/i386/chkp-bndret.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bndret" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c index 2acc087e62a..99cfa82681c 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_init_ptr_bounds" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c index dc62238c5bd..6da8d0a83ff 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_copy_ptr_bounds" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c index 055f0ed07d9..ae30534c6da 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_set_ptr_bounds" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c index 434df78ac34..d408a490b13 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump-not "bnd_null_ptr_bounds" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c b/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c index 4170886584f..6e6d067fb50 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt" } */ /* { dg-final { scan-tree-dump-not "bndcl" "chkpopt" } } */ /* { dg-final { scan-tree-dump-not "bndcu" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c b/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c index 18e497a0b92..683c21ddbe7 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */ int test (int *p) diff --git a/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c b/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c index 8d2b2288db2..ca7e9d2e5ce 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c +++ b/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ /* { dg-final { scan-assembler-not "test.chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-label-address.c b/gcc/testsuite/gcc.target/i386/chkp-label-address.c index 05963e2e6ed..979c33e93e3 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-label-address.c +++ b/gcc/testsuite/gcc.target/i386/chkp-label-address.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */ #include <stdio.h> diff --git a/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c b/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c index 5ceaa8e4621..70b8b38dc28 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt-details" } */ /* { dg-final { scan-tree-dump "Moving creation of \[^ \]+ down to its use" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c b/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c index 60e4ed2d602..ab1b122479a 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c +++ b/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */ /* { dg-final { scan-tree-dump "bndcl" "chkp" } } */ /* { dg-final { scan-tree-dump "bndcu" "chkp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-pr69044.c b/gcc/testsuite/gcc.target/i386/chkp-pr69044.c index 933e88a6e3c..16751f51766 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-pr69044.c +++ b/gcc/testsuite/gcc.target/i386/chkp-pr69044.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ int i; diff --git a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c index 7a87926a9c0..7c0f13f8ccf 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized" } */ /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c index 942f555b3a1..413941abcc2 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized -Wchkp" } */ /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-strchr.c b/gcc/testsuite/gcc.target/i386/chkp-strchr.c index 94a5eaab692..01ee619dfd9 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strchr.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strchr.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ #include "string.h" diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c index 01a7b397e6a..de6279f1dfa 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump "memcpy.chkp" "strlen" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c index c20ad8f099d..470ac4715a9 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c @@ -1,9 +1,9 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target stpcpy } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-not "strlen" "strlen" } } */ +#define _GNU_SOURCE #include "string.h" char *test (char *str1, char *str2) diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c index c8e9a7c6699..311c9a042e0 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c index 62166d0d875..dbf568b8418 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c @@ -1,9 +1,9 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen -D_GNU_SOURCE" } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ +#define _GNU_SOURCE #include "string.h" char * test (char *str1, char *str2) diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c index 66e9a63a0c4..e44096cd429 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c +++ b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ /* { dg-final { scan-tree-dump-times "strlen" 2 "strlen" } } */ /* { dg-final { scan-tree-dump "memcpy" "strlen" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c index 49e62f4fc22..18aa2819cdf 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memcpy_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c index b8454df956b..26e9f13a190 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memset_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c index 13b6e02e1fb..e84963f11f7 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memmove_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c index 2f1873044bf..638810b8be5 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c @@ -1,9 +1,9 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions -D_GNU_SOURCE" } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "mempcpy_nobnd" "chkpopt" } } */ +#define _GNU_SOURCE #include "string.h" void test (void *buf1, void *buf2, size_t len) diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c index 609d162d026..3b926b11f83 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memcpy_nobnd_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c index 3c876178a7e..a8d000ba1fa 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memset_nobnd_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c index ffe48f65a7d..7c6065657c0 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memmove_nobnd_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c index d4336be1445..b0f43a6880d 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c @@ -1,9 +1,9 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions -D_GNU_SOURCE" } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "mempcpy_nobnd_nochk" "chkpopt" } } */ +#define _GNU_SOURCE #include "string.h" void test (int *buf1, int *buf2, size_t len) diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c index 0187411edaf..cac0feaecbb 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memset_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c index a8da83b5ec4..72ff3869f7b 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "memmove_nochk" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c index a68d8fb0e40..216ed521edb 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c @@ -1,9 +1,9 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -D_GNU_SOURCE" } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ /* { dg-final { scan-tree-dump "mempcpy_nochk" "chkpopt" } } */ +#define _GNU_SOURCE #include "string.h" void test (int *buf1, int *buf2, size_t len) diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c index b449801b4a9..02ad9ccc496 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memcpy_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c index ffb34b6d92e..6db5d83a0bc 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memset_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c index ddaa6234d21..761e6263d86 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "memmove_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c index 67c34e05e60..afde3c92b9f 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c @@ -1,9 +1,9 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions -D_GNU_SOURCE" } */ +/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump "mempcpy_nobnd" "chkpopt" } } */ +#define _GNU_SOURCE #include "string.h" void test (int *buf1, int *buf2, size_t len) diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c index 3b14b031ba1..b79d09633dd 100644 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c +++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ /* { dg-final { scan-tree-dump-not "memcpy_nobnd" "chkpopt" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr63995-2.c b/gcc/testsuite/gcc.target/i386/pr63995-2.c index 7c22e625a8d..89b429e7f55 100644 --- a/gcc/testsuite/gcc.target/i386/pr63995-2.c +++ b/gcc/testsuite/gcc.target/i386/pr63995-2.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx -fcompare-debug" } */ struct ts diff --git a/gcc/testsuite/gcc.target/i386/pr64805.c b/gcc/testsuite/gcc.target/i386/pr64805.c index 8ba0a972208..3c8d6668dfa 100644 --- a/gcc/testsuite/gcc.target/i386/pr64805.c +++ b/gcc/testsuite/gcc.target/i386/pr64805.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx" } */ #include <stdio.h> diff --git a/gcc/testsuite/gcc.target/i386/pr65044.c b/gcc/testsuite/gcc.target/i386/pr65044.c index 8d3bc9b98b8..9b0636339e5 100644 --- a/gcc/testsuite/gcc.target/i386/pr65044.c +++ b/gcc/testsuite/gcc.target/i386/pr65044.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=address" } */ /* { dg-error "-fcheck-pointer-bounds is not supported with Address Sanitizer" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/i386/pr65167.c b/gcc/testsuite/gcc.target/i386/pr65167.c index 35f3d6bc884..64cc7aef520 100644 --- a/gcc/testsuite/gcc.target/i386/pr65167.c +++ b/gcc/testsuite/gcc.target/i386/pr65167.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O -fschedule-insns -fcheck-pointer-bounds -mmpx" } */ void bar(int *a, int *b, int *c, int *d, int *e, int *f); diff --git a/gcc/testsuite/gcc.target/i386/pr65183.c b/gcc/testsuite/gcc.target/i386/pr65183.c index 069a543af36..4d62267fc0d 100644 --- a/gcc/testsuite/gcc.target/i386/pr65183.c +++ b/gcc/testsuite/gcc.target/i386/pr65183.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O -fcheck-pointer-bounds -fchkp-use-nochk-string-functions -mmpx" } */ extern void bar(void *); diff --git a/gcc/testsuite/gcc.target/i386/pr65184.c b/gcc/testsuite/gcc.target/i386/pr65184.c index 0355f29a0f2..e12b8a922f1 100644 --- a/gcc/testsuite/gcc.target/i386/pr65184.c +++ b/gcc/testsuite/gcc.target/i386/pr65184.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O2 -mabi=ms -fcheck-pointer-bounds -mmpx" } */ void diff --git a/gcc/testsuite/gcc.target/i386/pr66137.c b/gcc/testsuite/gcc.target/i386/pr66137.c new file mode 100644 index 00000000000..ac230bfdee7 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66137.c @@ -0,0 +1,11 @@ +/* PR target/66137 */ +/* { dg-do compile } */ +/* { dg-options "-mavx -O3 -ffixed-ebp" } */ + +void +foo (char *x, char *y, char *z, int a) +{ + int i; + for (i = a; i > 0; i--) + *x++ = *y++ = *z++; +} diff --git a/gcc/testsuite/gcc.target/i386/pr68674.c b/gcc/testsuite/gcc.target/i386/pr68674.c new file mode 100644 index 00000000000..37c57592fec --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68674.c @@ -0,0 +1,15 @@ +/* PR target/68674 */ +/* { dg-do compile } */ +/* { dg-require-effective-target avx } */ +/* { dg-options "-O2" } */ + +typedef int v8si __attribute__((vector_size(32))); + +v8si a; + + __attribute__((target("avx"))) +v8si +foo() +{ + return a; +} diff --git a/gcc/testsuite/gcc.target/i386/pr68986-1.c b/gcc/testsuite/gcc.target/i386/pr68986-1.c new file mode 100644 index 00000000000..998f34f05b4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68986-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target tls_native } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-fPIC -mno-accumulate-outgoing-args -mpreferred-stack-boundary=5 -mincoming-stack-boundary=4" } */ + +extern __thread int msgdata; +int +foo () +{ + return msgdata; +} diff --git a/gcc/testsuite/gcc.target/i386/pr68986-2.c b/gcc/testsuite/gcc.target/i386/pr68986-2.c new file mode 100644 index 00000000000..c3a366c1958 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68986-2.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-require-effective-target tls_native } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-fPIC -mno-accumulate-outgoing-args -mpreferred-stack-boundary=2" } */ + +extern __thread int msgdata; +int +foo () +{ + return msgdata; +} + +/* { dg-final { scan-assembler "andl\[\\t \]*\\$-16,\[\\t \]*%esp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr68986-3.c b/gcc/testsuite/gcc.target/i386/pr68986-3.c new file mode 100644 index 00000000000..5744cf222ae --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68986-3.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target tls_native } */ +/* { dg-require-effective-target fpic } */ +/* { dg-options "-fPIC -mno-sse -mpreferred-stack-boundary=3 -mincoming-stack-boundary=3" } */ + +extern __thread int msgdata; +int +foo () +{ + return msgdata; +} + +/* { dg-final { scan-assembler "and\[lq\]\[\\t \]*\\$-16,\[\\t \]*%\[re\]?sp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr68990.c b/gcc/testsuite/gcc.target/i386/pr68990.c new file mode 100644 index 00000000000..4c3ca0331d5 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr68990.c @@ -0,0 +1,49 @@ +/* { dg-do compile { target { ia32 } } } */ +/* { dg-options "-O3 -march=x86-64" } */ +/* { dg-final { scan-assembler-not "cmpl\[ \t]+(\[%a-z]+), \\1" } } */ + +short a; +int b = 1, f; +char c, e = 1; +long long d; + +static short +foo () +{ + unsigned g, h = 0; + int i = 0 || d * (b | e); + char j = a << i, l = a; + short k; + int m = -b; + if (m < b) + { + k = m = b; + g = (k || l) / (b / e); + if (b) + __builtin_printf ("foo=%lld\n", (long long) a); + } + a = b = m; + if (j || e) + { + h = g; + i = m; + g = j * k / (i - d); + if (m) + b = j && b; + e = b * (h & d) || g; + } + b = i; + char n = e || h | d; + e = i < d & k / n; + return f; +} + +int +main () +{ + if (foo ()) + if (c) + lab: + goto lab; + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr69459.c b/gcc/testsuite/gcc.target/i386/pr69459.c new file mode 100644 index 00000000000..2d0bbbcdbf1 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69459.c @@ -0,0 +1,42 @@ +/* PR target/69549 */ +/* { dg-do run { target sse2_runtime } } */ +/* { dg-options "-O2 -msse2" } */ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; +typedef unsigned char v16u8 __attribute__ ((vector_size (16))); +typedef unsigned short v16u16 __attribute__ ((vector_size (16))); +typedef unsigned int v16u32 __attribute__ ((vector_size (16))); +typedef unsigned long long v16u64 __attribute__ ((vector_size (16))); + +u64 __attribute__((noinline, noclone)) +foo (u8 u8_0, u16 u16_3, v16u8 v16u8_0, v16u16 v16u16_0, v16u32 v16u32_0, v16u64 v16u64_0, v16u8 v16u8_1, v16u16 v16u16_1, v16u32 v16u32_1, v16u64 v16u64_1, v16u8 v16u8_2, v16u16 v16u16_2, v16u32 v16u32_2, v16u64 v16u64_2, v16u8 v16u8_3, v16u16 v16u16_3, v16u32 v16u32_3, v16u64 v16u64_3) +{ + v16u64_0 /= (v16u64){u16_3, ((0))} | 1; + v16u64_1 += (v16u64)~v16u32_0; + v16u16_1 /= (v16u16){-v16u64_3[1]} | 1; + v16u64_3[1] -= 0x1fffffff; + v16u32_2 /= (v16u32)-v16u64_0 | 1; + v16u32_1 += ~v16u32_1; + v16u16_3 %= (v16u16){0xfff, v16u32_2[3], v16u8_0[14]} | 1; + v16u64_3 -= (v16u64)v16u32_2; + if (v16u64_1[1] >= 1) { + v16u64_0 %= (v16u64){v16u32_0[1]} | 1; + v16u32_1[1] %= 0x5fb856; + v16u64_1 |= -v16u64_0; + } + v16u8_0 *= (v16u8)v16u32_1; + return u8_0 + v16u8_0 [12] + v16u8_0 [13] + v16u8_0 [14] + v16u8_0 [15] + v16u16_0 [0] + v16u16_0 [1] + v16u32_0 [0] + v16u32_0 [1] + v16u32_0 [2] + v16u32_0 [3] + v16u64_0 [0] + v16u64_0 [1] + v16u8_1 [9] + v16u8_1 [10] + v16u8_1 [11] + v16u8_1 [15] + v16u16_1 [0] + v16u16_1 [1] + v16u16_1 [3] + v16u64_1 [0] + v16u64_1 [1] + v16u8_2 [3] + v16u8_2 [4] + v16u8_2 [5] + v16u8_2 [0] + v16u32_2 [1] + v16u32_2 [2] + v16u32_2 [3] + v16u64_2 [0] + v16u64_2 [1] + v16u8_3 [0] + v16u16_3 [6] + v16u16_3[7] + v16u32_3[1] + v16u32_3[2] + v16u64_3[0] + v16u64_3[1]; +} + +int +main () +{ + u64 x = foo(1, 1, (v16u8){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, (v16u16){1, 1}, (v16u32){1}, (v16u64){1}, (v16u8){1}, (v16u16){1, 1}, (v16u32){1}, (v16u64){1}, (v16u8){1, 1, 1, 1, 1}, (v16u16){1}, (v16u32){1}, (v16u64){1}, (v16u8){1}, (v16u16){1}, (v16u32){1}, (v16u64){1}); + + if (x != 0xffffffffe0000209) + __builtin_abort(); + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr69512.c b/gcc/testsuite/gcc.target/i386/pr69512.c new file mode 100644 index 00000000000..4147e663ef6 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69512.c @@ -0,0 +1,14 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-march=i586 -mavx -O2" } */ + +extern double s1[]; +extern double s2[]; +extern long long e[]; + +void test (void) +{ + int i; + + for (i = 0; i < 2; i++) + e[i] = !__builtin_isunordered(s1[i], s2[i]) && s1[i] != s2[i] ? -1 : 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr69530.c b/gcc/testsuite/gcc.target/i386/pr69530.c new file mode 100644 index 00000000000..9146d1daf53 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69530.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O -fno-forward-propagate -fno-split-wide-types -mavx " } */ + +typedef unsigned __int128 v32u128 __attribute__ ((vector_size (32))); + +v32u128 +foo (v32u128 v32u128_0) +{ + v32u128_0[0] *= v32u128_0[1]; + return v32u128_0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr69551.c b/gcc/testsuite/gcc.target/i386/pr69551.c new file mode 100644 index 00000000000..1505fc21dbf --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69551.c @@ -0,0 +1,23 @@ +/* PR target/69551 */ +/* { dg-do run { target sse_runtime } } */ +/* { dg-options "-O2 -mno-sse2 -msse" } */ + +typedef unsigned char v16qi __attribute__ ((vector_size (16))); +typedef unsigned int v4si __attribute__ ((vector_size (16))); + +char __attribute__ ((noinline, noclone)) +test (v4si vec) +{ + vec[1] = 0x5fb856; + return ((v16qi) vec)[0]; +} + +int +main () +{ + char z = test ((v4si) { -1, -1, -1, -1 }); + + if (z != -1) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/thunk-retbnd.c b/gcc/testsuite/gcc.target/i386/thunk-retbnd.c index 88ec9c9441d..dcce6baf104 100644 --- a/gcc/testsuite/gcc.target/i386/thunk-retbnd.c +++ b/gcc/testsuite/gcc.target/i386/thunk-retbnd.c @@ -1,5 +1,4 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target mpx } */ +/* { dg-do compile { target { ! x32 } } } */ /* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -fdump-tree-optimized" } */ /* { dg-final { scan-tree-dump-times "return &glob," 2 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/mips/div-delay.c b/gcc/testsuite/gcc.target/mips/div-delay.c new file mode 100644 index 00000000000..bdeb125d3f5 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/div-delay.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-march=mips1 -fno-delayed-branch" } */ +/* { dg-final { scan-assembler "\tbne\t.*\tnop" } } */ + +/* Ensure that mips1 does not put anything in the delay slot of the bne + instruction when checking for divide by zero. mips2+ systems use teq + instead of bne and teq has no delay slot. */ + +NOCOMPRESSION int +foo (int a, int b) +{ + return a / b; +} diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index f1913318bff..32581058ff1 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -142,6 +142,9 @@ # isa=loongson # select a Loongson processor # +# isa=p5600 +# select a P5600 processor +# # addressing=absolute # force absolute addresses to be used # @@ -257,6 +260,7 @@ set mips_option_groups { lsa "(|!)HAS_LSA" section_start "-Wl,--section-start=.*" frame-header "-mframe-header-opt|-mno-frame-header-opt" + stack-protector "-fstack-protector" } for { set option 0 } { $option < 32 } { incr option } { @@ -1010,6 +1014,10 @@ proc mips-dg-options { args } { if { ![regexp {^-march=loongson} $arch] } { set arch "-march=loongson2f" } + } elseif { [string equal $spec "isa=p5600"] } { + if { ![regexp {^-march=p5600} $arch] } { + set arch "-march=p5600" + } } else { if { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]*)$} \ $spec dummy prop relation value nocpus] } { diff --git a/gcc/testsuite/gcc.target/mips/p5600-bonding.c b/gcc/testsuite/gcc.target/mips/p5600-bonding.c index 0890ffa9215..0bc6d91ef1e 100644 --- a/gcc/testsuite/gcc.target/mips/p5600-bonding.c +++ b/gcc/testsuite/gcc.target/mips/p5600-bonding.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-dp -mtune=p5600 -mno-micromips -mno-mips16" } */ +/* { dg-options "-dp isa=p5600 -mtune=p5600 -mno-micromips -mno-mips16" } */ /* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0" "-O1" } { "" } } */ typedef int VINT32 __attribute__ ((vector_size((16)))); diff --git a/gcc/testsuite/gcc.target/mips/pr68400.c b/gcc/testsuite/gcc.target/mips/pr68400.c new file mode 100644 index 00000000000..1099568a8dc --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/pr68400.c @@ -0,0 +1,28 @@ +/* PR target/pr68400 + This was triggering an ICE in change_address_1 when compiled with -Os. */ + +/* { dg-do compile } */ +/* { dg-options "-fstack-protector -mips16" } */ + +typedef struct s { + unsigned long long d; + long long t; +} p; + +int sh(int x, unsigned char *buf) +{ + p *uhdr = (p *)buf; + unsigned int i = 0; + uhdr->d = ((uhdr->d & 0xff00000000000000LL) >> 56) + | ((uhdr->d & 0x0000ff0000000000LL) >> 24) + | ((uhdr->d & 0x00000000ff000000LL) << 8) + | ((uhdr->d & 0x00000000000000ffLL) << 56); + uhdr->t = ((uhdr->t & 0xff00000000000000LL) >> 56) + | ((uhdr->t & 0x0000ff0000000000LL) >> 24) + | ((uhdr->t & 0x000000ff00000000LL) >> 8) + | ((uhdr->t & 0x00000000ff000000LL) << 8) + | ((uhdr->t & 0x000000000000ff00LL) << 40) + | ((uhdr->t & 0x00000000000000ffLL) << 56); + i += 4; + if (x < i) return 0; else return 1; +} diff --git a/gcc/testsuite/gcc.target/mips/pr69129.c b/gcc/testsuite/gcc.target/mips/pr69129.c new file mode 100644 index 00000000000..186582f50d8 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/pr69129.c @@ -0,0 +1,29 @@ +_Noreturn void fn1 (int) __attribute__((__visibility__("hidden"))); + +void +fn2 (void *p1) +{ + int a[7]; + float *b; + int c, n; + + if (c != p1) /* { dg-warning "comparison between pointer and integer" } */ + fn1 (1); + + n = 0; + for (; c; n++) + { + int d; + if (a[n] != d) + fn1(n); + } + + b = p1; + + while (1) + { + *b = 3.40282347e38f; + if (a[0]) + return; + } +} diff --git a/gcc/testsuite/gcc.target/powerpc/20050830-1.c b/gcc/testsuite/gcc.target/powerpc/20050830-1.c index 4a8f71a9871..bcbcef893bf 100644 --- a/gcc/testsuite/gcc.target/powerpc/20050830-1.c +++ b/gcc/testsuite/gcc.target/powerpc/20050830-1.c @@ -1,7 +1,8 @@ /* Make sure the doloop optimization is done for this loop. */ /* { dg-do compile { target powerpc*-*-* } } */ /* { dg-options "-O2" } */ -/* { dg-final { scan-assembler "bdn" } } */ +/* XFAIL for now, see PR66612. */ +/* { dg-final { scan-assembler "bdn" { xfail *-*-* } } } */ extern int a[]; int foo(int w) { int n = w; diff --git a/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c new file mode 100644 index 00000000000..a0e30410050 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/cpu-builtin-1.c @@ -0,0 +1,65 @@ +/* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ + +void +use_cpu_is_builtins (unsigned int *p) +{ + p[0] = __builtin_cpu_is ("power9"); + p[1] = __builtin_cpu_is ("power8"); + p[2] = __builtin_cpu_is ("power7"); + p[3] = __builtin_cpu_is ("power6x"); + p[4] = __builtin_cpu_is ("power6"); + p[5] = __builtin_cpu_is ("power5+"); + p[6] = __builtin_cpu_is ("power5"); + p[7] = __builtin_cpu_is ("ppc970"); + p[8] = __builtin_cpu_is ("power4"); + p[9] = __builtin_cpu_is ("ppca2"); + p[10] = __builtin_cpu_is ("ppc476"); + p[11] = __builtin_cpu_is ("ppc464"); + p[12] = __builtin_cpu_is ("ppc440"); + p[13] = __builtin_cpu_is ("ppc405"); + p[14] = __builtin_cpu_is ("ppc-cell-be"); +} + +void +use_cpu_supports_builtins (unsigned int *p) +{ + p[0] = __builtin_cpu_supports ("4xxmac"); + p[1] = __builtin_cpu_supports ("altivec"); + p[2] = __builtin_cpu_supports ("arch_2_05"); + p[3] = __builtin_cpu_supports ("arch_2_06"); + p[4] = __builtin_cpu_supports ("arch_2_07"); + p[5] = __builtin_cpu_supports ("arch_3_00"); + p[6] = __builtin_cpu_supports ("archpmu"); + p[7] = __builtin_cpu_supports ("booke"); + p[8] = __builtin_cpu_supports ("cellbe"); + p[9] = __builtin_cpu_supports ("dfp"); + p[10] = __builtin_cpu_supports ("dscr"); + p[11] = __builtin_cpu_supports ("ebb"); + p[12] = __builtin_cpu_supports ("efpdouble"); + p[13] = __builtin_cpu_supports ("efpsingle"); + p[14] = __builtin_cpu_supports ("fpu"); + p[15] = __builtin_cpu_supports ("htm"); + p[16] = __builtin_cpu_supports ("htm-nosc"); + p[17] = __builtin_cpu_supports ("ic_snoop"); + p[18] = __builtin_cpu_supports ("ieee128"); + p[19] = __builtin_cpu_supports ("isel"); + p[20] = __builtin_cpu_supports ("mmu"); + p[21] = __builtin_cpu_supports ("notb"); + p[22] = __builtin_cpu_supports ("pa6t"); + p[23] = __builtin_cpu_supports ("power4"); + p[24] = __builtin_cpu_supports ("power5"); + p[25] = __builtin_cpu_supports ("power5+"); + p[26] = __builtin_cpu_supports ("power6x"); + p[27] = __builtin_cpu_supports ("ppc32"); + p[28] = __builtin_cpu_supports ("ppc601"); + p[29] = __builtin_cpu_supports ("ppc64"); + p[30] = __builtin_cpu_supports ("ppcle"); + p[31] = __builtin_cpu_supports ("smt"); + p[32] = __builtin_cpu_supports ("spe"); + p[33] = __builtin_cpu_supports ("tar"); + p[34] = __builtin_cpu_supports ("true_le"); + p[35] = __builtin_cpu_supports ("ucache"); + p[36] = __builtin_cpu_supports ("vcrypto"); + p[37] = __builtin_cpu_supports ("vsx"); +} diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-8.c b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-8.c index b204d9954ba..dbb82a35889 100644 --- a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-8.c +++ b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-8.c @@ -1,5 +1,6 @@ -/* { dg-do compile { target int128 } } */ +/* { dg-do compile } */ /* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-require-effective-target int128 } */ /* { dg-options "-mpower8-vector -O2" } */ #include <altivec.h> diff --git a/gcc/testsuite/gcc.target/powerpc/pr17381.c b/gcc/testsuite/gcc.target/powerpc/pr17381.c new file mode 100644 index 00000000000..e6222c130af --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr17381.c @@ -0,0 +1,11 @@ +/* PR target/17381 - Unnecessary register move for float extend */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +double d; +float test1(float fParm) +{ + d = fParm + 1.0; + return fParm + 1.0f; +} +/* { dg-final { scan-assembler-times "fmr" 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr63354.c b/gcc/testsuite/gcc.target/powerpc/pr63354.c new file mode 100644 index 00000000000..fd6de4d6287 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr63354.c @@ -0,0 +1,12 @@ +/* Verify that we don't stack a frame for leaf functions when using + -pg -mprofile-kernel. */ + +/* { dg-do compile { target { powerpc*-*-linux* } } } */ +/* { dg-options "-O2 -pg -mprofile-kernel" } */ +/* { dg-require-effective-target powerpc64 } */ +/* { dg-final { scan-assembler-not "mtlr" } } */ + +int foo(void) +{ + return 1; +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr69252.c b/gcc/testsuite/gcc.target/powerpc/pr69252.c new file mode 100644 index 00000000000..23334a900cb --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr69252.c @@ -0,0 +1,28 @@ +/* PR target/69252 - [4.9/5/6 Regression] gcc.dg/vect/vect-iv-9.c FAILs + with -Os -fmodulo-sched -fmodulo-sched-allow-regmoves -fsched-pressure */ +/* { dg-do run } */ +/* { dg-options "-Os -fmodulo-sched -fmodulo-sched-allow-regmoves -fsched-pressure " } */ +#define N 26 +int a[N]; +__attribute__ ((noinline, noclone)) + int main1 (int X) +{ + int s = X; + int i; + for (i = 0; i < N; i++) + s += (i + a[i]); + return s; +} + +int +main (void) +{ + int s, i; + for (i = 0; i < N; i++) + a[i] = 2 * i; + s = main1 (3); + if (s != 978) + __builtin_abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-2.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-2.c index 34dbd57a29c..b05c9cd351c 100644 --- a/gcc/testsuite/gcc.target/powerpc/vsx-vector-2.c +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-2.c @@ -9,7 +9,7 @@ /* { dg-final { scan-assembler "xvdivsp" } } */ /* { dg-final { scan-assembler "vmadd" } } */ /* { dg-final { scan-assembler "xvmsub" } } */ -/* { dg-final { scan-assembler "xvsqrtsp" } } */ +/* { dg-final { scan-assembler "xvrsqrtesp" } } */ /* { dg-final { scan-assembler "xvcpsgnsp" } } */ /* { dg-final { scan-assembler "xvrspim" } } */ /* { dg-final { scan-assembler "xvrspip" } } */ |