From c5fcb94ba94e936ea6983cb5f238fd50c789c804 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 10 Jul 2008 23:00:53 +0100 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e4ac8e7026a..0b83fa5c37f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-07-10 Joseph Myers + + 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 PR middle-end/36790 diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c index 37d10bc5b68..0386ecba7ca 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c +++ b/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c @@ -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" } } */ -- 2.30.2