diff options
author | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2017-10-18 08:21:45 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2017-10-18 08:21:45 +0000 |
commit | de57059efaaa117561a631e26a47b67eae1943bb (patch) | |
tree | 080d1584784cf345ea4872867ac204026c5d4bdd /gcc | |
parent | 236ac44204c4a0f172751fad3221a8686e58bfc7 (diff) | |
download | gcc-de57059efaaa117561a631e26a47b67eae1943bb.zip gcc-de57059efaaa117561a631e26a47b67eae1943bb.tar.gz gcc-de57059efaaa117561a631e26a47b67eae1943bb.tar.bz2 |
S/390: Fix vec-cmp-2 testcase
The functions all call foo and therefore need a stack frame what makes
them subject to shrink wrapping. Also all the additional instructions
in the function body makes it fragile wrt instruction scheduling. Just
set a global variable instead to circumvent this.
gcc/testsuite/ChangeLog:
2017-10-18 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/zvector/vec-cmp-2.c
(all_eq_double, all_ne_double, all_gt_double)
(all_lt_double, all_ge_double, all_le_double)
(any_eq_double, any_ne_double, any_gt_double)
(any_lt_double, any_ge_double, any_le_double)
(all_eq_int, all_ne_int, all_gt_int)
(all_lt_int, all_ge_int, all_le_int)
(any_eq_int, any_ne_int, any_gt_int)
(any_lt_int, any_ge_int, any_le_int): Set global variable instead
of calling foo(). Fix return type.
From-SVN: r253846
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/s390/zvector/vec-cmp-2.c | 98 |
2 files changed, 62 insertions, 49 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4ac7524..bfb0197 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2017-10-18 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + + * gcc.target/s390/zvector/vec-cmp-2.c + (all_eq_double, all_ne_double, all_gt_double) + (all_lt_double, all_ge_double, all_le_double) + (any_eq_double, any_ne_double, any_gt_double) + (any_lt_double, any_ge_double, any_le_double) + (all_eq_int, all_ne_int, all_gt_int) + (all_lt_int, all_ge_int, all_le_int) + (any_eq_int, any_ne_int, any_gt_int) + (any_lt_int, any_ge_int, any_le_int): Set global variable instead + of calling foo(). Fix return type. + 2017-10-18 Martin Liska <mliska@suse.cz> PR sanitizer/82545 diff --git a/gcc/testsuite/gcc.target/s390/zvector/vec-cmp-2.c b/gcc/testsuite/gcc.target/s390/zvector/vec-cmp-2.c index 0711f9c..1e63def 100644 --- a/gcc/testsuite/gcc.target/s390/zvector/vec-cmp-2.c +++ b/gcc/testsuite/gcc.target/s390/zvector/vec-cmp-2.c @@ -7,197 +7,197 @@ #include <vecintrin.h> -extern void foo (void); +int g = 1; -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_eq_double (vector double a, vector double b) { if (__builtin_expect (vec_all_eq (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_eq_double:\n\tvfcedbs\t%v\[0-9\]*,%v24,%v26\n\tjne 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_ne_double (vector double a, vector double b) { if (__builtin_expect (vec_all_ne (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_ne_double:\n\tvfcedbs\t%v\[0-9\]*,%v24,%v26\n\tjle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_gt_double (vector double a, vector double b) { if (__builtin_expect (vec_all_gt (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_gt_double:\n\tvfchdbs\t%v\[0-9\]*,%v24,%v26\n\tjne 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_lt_double (vector double a, vector double b) { if (__builtin_expect (vec_all_lt (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_lt_double:\n\tvfchdbs\t%v\[0-9\]*,%v26,%v24\n\tjne 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_ge_double (vector double a, vector double b) { if (__builtin_expect (vec_all_ge (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_ge_double:\n\tvfchedbs\t%v\[0-9\]*,%v24,%v26\n\tjne 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_le_double (vector double a, vector double b) { if (__builtin_expect (vec_all_le (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_le_double:\n\tvfchedbs\t%v\[0-9\]*,%v26,%v24\n\tjne 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_eq_double (vector double a, vector double b) { if (__builtin_expect (vec_any_eq (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_eq_double:\n\tvfcedbs\t%v\[0-9\]*,%v24,%v26\n\tjnle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_ne_double (vector double a, vector double b) { if (__builtin_expect (vec_any_ne (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_ne_double:\n\tvfcedbs\t%v\[0-9\]*,%v24,%v26\n\tje 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_gt_double (vector double a, vector double b) { if (__builtin_expect (vec_any_gt (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_gt_double:\n\tvfchdbs\t%v\[0-9\]*,%v24,%v26\n\tjnle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_lt_double (vector double a, vector double b) { if (__builtin_expect (vec_any_lt (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_lt_double:\n\tvfchdbs\t%v\[0-9\]*,%v26,%v24\n\tjnle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_ge_double (vector double a, vector double b) { if (__builtin_expect (vec_any_ge (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_ge_double:\n\tvfchedbs\t%v\[0-9\]*,%v24,%v26\n\tjnle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_le_double (vector double a, vector double b) { if (__builtin_expect (vec_any_le (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_le_double:\n\tvfchedbs\t%v\[0-9\]*,%v26,%v24\n\tjnle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_eq_int (vector int a, vector int b) { if (__builtin_expect (vec_all_eq (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_eq_int:\n\tvceqfs\t%v\[0-9\]*,%v24,%v26\n\tjne 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_ne_int (vector int a, vector int b) { if (__builtin_expect (vec_all_ne (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_ne_int:\n\tvceqfs\t%v\[0-9\]*,%v24,%v26\n\tjle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_gt_int (vector int a, vector int b) { if (__builtin_expect (vec_all_gt (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_gt_int:\n\tvchfs\t%v\[0-9\]*,%v24,%v26\n\tjne 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_lt_int (vector int a, vector int b) { if (__builtin_expect (vec_all_lt (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_lt_int:\n\tvchfs\t%v\[0-9\]*,%v26,%v24\n\tjne 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_ge_int (vector int a, vector int b) { if (__builtin_expect (vec_all_ge (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_ge_int:\n\tvchfs\t%v\[0-9\]*,%v26,%v24\n\tjle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) all_le_int (vector int a, vector int b) { if (__builtin_expect (vec_all_le (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times all_le_int:\n\tvchfs\t%v\[0-9\]*,%v24,%v26\n\tjle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_eq_int (vector int a, vector int b) { if (__builtin_expect (vec_any_eq (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_eq_int:\n\tvceqfs\t%v\[0-9\]*,%v24,%v26\n\tjnle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_ne_int (vector int a, vector int b) { if (__builtin_expect (vec_any_ne (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_ne_int:\n\tvceqfs\t%v\[0-9\]*,%v24,%v26\n\tje 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_gt_int (vector int a, vector int b) { if (__builtin_expect (vec_any_gt (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_gt_int:\n\tvchfs\t%v\[0-9\]*,%v24,%v26\n\tjnle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_lt_int (vector int a, vector int b) { if (__builtin_expect (vec_any_lt (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_lt_int:\n\tvchfs\t%v\[0-9\]*,%v26,%v24\n\tjnle 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_ge_int (vector int a, vector int b) { if (__builtin_expect (vec_any_ge (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_ge_int:\n\tvchfs\t%v\[0-9\]*,%v26,%v24\n\tje 1 } } */ -int __attribute__((noinline,noclone)) +void __attribute__((noinline,noclone)) any_le_int (vector int a, vector int b) { if (__builtin_expect (vec_any_le (a, b), 1)) - foo (); + g = 2; } /* { dg-final { scan-assembler-times any_le_int:\n\tvchfs\t%v\[0-9\]*,%v24,%v26\n\tje 1 } } */ |