cmpstr.c: Fix excess failures caused by switch to GNU11.
gcc/testsuite/ * gcc.target/sh/cmpstr.c: Fix excess failures caused by switch to GNU11. * gcc.target/sh/strlen.c: Likewise. * gcc.target/sh/pr51244-13.c: Likewise. * gcc.target/sh/cmpstrn.c: Likewise. * gcc.target/sh/hiconst.c: Likewise. * gcc.target/sh/pr43417.c: Likewise. From-SVN: r216351
This commit is contained in:
parent
957f47e6c8
commit
e4c6530e82
@ -1,3 +1,12 @@
|
||||
2014-10-16 Oleg Endo <olegendo@gcc.gnu.org>
|
||||
|
||||
* gcc.target/sh/cmpstr.c: Fix excess failures caused by switch to GNU11.
|
||||
* gcc.target/sh/strlen.c: Likewise.
|
||||
* gcc.target/sh/pr51244-13.c: Likewise.
|
||||
* gcc.target/sh/cmpstrn.c: Likewise.
|
||||
* gcc.target/sh/hiconst.c: Likewise.
|
||||
* gcc.target/sh/pr43417.c: Likewise.
|
||||
|
||||
2014-10-16 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* gcc.dg/guality/pr43077-1.c: IPA ICF disabled
|
||||
|
@ -7,6 +7,7 @@
|
||||
/* { dg-final { scan-assembler-times "cmp/str" 3 } } */
|
||||
/* { dg-final { scan-assembler-times "tst\t#3" 2 } } */
|
||||
|
||||
int
|
||||
test00 (const char *s1, const char *s2)
|
||||
{
|
||||
return __builtin_strcmp (s1, s2);
|
||||
@ -14,13 +15,15 @@ test00 (const char *s1, const char *s2)
|
||||
|
||||
/* NB: This might change as further optimisation might detect the
|
||||
max length and fallback to cmpstrn. */
|
||||
test01(const char *s2)
|
||||
int
|
||||
test01 (const char *s2)
|
||||
{
|
||||
return __builtin_strcmp ("abc", s2);
|
||||
}
|
||||
|
||||
/* Check that no test for alignment is needed. */
|
||||
test03(const char *s1, const char *s2)
|
||||
int
|
||||
test03 (const char *s1, const char *s2)
|
||||
{
|
||||
return __builtin_strcmp (__builtin_assume_aligned (s1, 4),
|
||||
__builtin_assume_aligned (s2, 4));
|
||||
|
@ -7,19 +7,22 @@
|
||||
/* { dg-final { scan-assembler-times "cmp/str" 1 } } */
|
||||
|
||||
/* Test that cmp/str is not used for small lengths. */
|
||||
test01(const char *s1)
|
||||
int
|
||||
test01 (const char *s1)
|
||||
{
|
||||
return __builtin_strncmp (s1, "abcde", 3);
|
||||
}
|
||||
|
||||
/* Test that the cmp/str loop is used. */
|
||||
test02(const char *s1)
|
||||
int
|
||||
test02 (const char *s1)
|
||||
{
|
||||
return __builtin_strncmp (s1, "abcdefghi", 8);
|
||||
}
|
||||
|
||||
/* Test that no call is generated */
|
||||
test03(const char *s1, int n)
|
||||
int
|
||||
test03 (const char *s1, int n)
|
||||
{
|
||||
return __builtin_strncmp (s1, "abcde", n);
|
||||
}
|
||||
|
@ -4,7 +4,8 @@
|
||||
char a;
|
||||
int b;
|
||||
|
||||
foo(char *pt, int *pti)
|
||||
int
|
||||
foo (char *pt, int *pti)
|
||||
{
|
||||
a = 0;
|
||||
b = 0;
|
||||
@ -12,7 +13,7 @@ foo(char *pt, int *pti)
|
||||
*pti = 0;
|
||||
}
|
||||
|
||||
rab(char *pt, int *pti)
|
||||
int rab (char *pt, int *pti)
|
||||
{
|
||||
pt[2] = 0;
|
||||
pti[3] = 0;
|
||||
|
@ -2,11 +2,18 @@
|
||||
/* { dg-options "-O2 -m4" } */
|
||||
|
||||
int pid_count = 0;
|
||||
main (int argc, char *argv[])
|
||||
|
||||
unsigned int getopt (int, const char**, const char*);
|
||||
unsigned long long atoll (const char*);
|
||||
int fork (void);
|
||||
void kill (int, int);
|
||||
|
||||
int
|
||||
main (int argc, const char *argv[])
|
||||
{
|
||||
unsigned int c;
|
||||
unsigned long long maxbytes = 0;
|
||||
extern char *optarg;
|
||||
extern const char *optarg;
|
||||
int i;
|
||||
int pid_cntr;
|
||||
int pid;
|
||||
|
@ -13,6 +13,10 @@
|
||||
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
|
||||
/* { dg-final { scan-assembler-times "tst" 2 } } */
|
||||
|
||||
void printk (const char*, const char*, int);
|
||||
void __constant_set_bit (int, unsigned long int*);
|
||||
void __set_bit (int, unsigned long int*);
|
||||
|
||||
static __inline__ int
|
||||
__test_bit (unsigned long nr, volatile void * addr)
|
||||
{
|
||||
@ -32,6 +36,8 @@ struct list_head
|
||||
struct list_head *next, *prev;
|
||||
};
|
||||
|
||||
void list_add (struct list_head*, struct list_head*);
|
||||
|
||||
static inline void
|
||||
__list_del (struct list_head *prev, struct list_head *next)
|
||||
{
|
||||
|
@ -7,13 +7,15 @@
|
||||
/* { dg-final { scan-assembler-times "cmp/str" 2 } } */
|
||||
/* { dg-final { scan-assembler-times "tst\t#3" 1 } } */
|
||||
|
||||
int
|
||||
test00 (const char *s1)
|
||||
{
|
||||
return __builtin_strlen (s1);
|
||||
}
|
||||
|
||||
/* Check that no test for alignment is needed. */
|
||||
test03(const char *s1)
|
||||
int
|
||||
test03 (const char *s1)
|
||||
{
|
||||
return __builtin_strlen (__builtin_assume_aligned (s1, 4));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user