re PR testsuite/29056 (gcc.target/powerpc/ppc-negeq0-1.c fails on powerpc64)

PR middle-end/29056
	* gcc.target/powerpc/ppc-negeq0-1.c: Use long instead of int.
	Adjust shift and scan-assembler-not pattern to allow for 64-bit
	case.

From-SVN: r137704
This commit is contained in:
Joseph Myers 2008-07-10 23:00:53 +01:00 committed by Joseph Myers
parent 8dd9a120a2
commit c5fcb94ba9
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2008-07-10 Joseph Myers <joseph@codesourcery.com>
PR middle-end/29056
* gcc.target/powerpc/ppc-negeq0-1.c: Use long instead of int.
Adjust shift and scan-assembler-not pattern to allow for 64-bit
case.
2008-07-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/36790

View File

@ -1,15 +1,15 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
int foo(int x)
long foo(long x)
{
return -(x == 0);
}
int bar(int x)
long bar(long x)
{
int t = __builtin_clz(x);
return -(t>>5);
long t = __builtin_clzl(x);
return -(t>>(sizeof(long) == 8 ? 6 : 5));
}
/* { dg-final { scan-assembler-not "cntlzw" } } */
/* { dg-final { scan-assembler-not "cntlz" } } */