------- Comment #5 from howarth at nitro dot med dot uc dot edu 2007-12-24 18:26 ------- Would...
/* { dg-do compile } */ /* { dg-options "-O2" } */ long foo(long x) { return -(x == 0); } long bar(long x) { long t = __builtin_clzl(x); return -(t>>5); } /* { dg-final { scan-assembler-not "cntlzw" } } */ ...be an acceptable revision then. This passes on powerpc-apple-darwin9 with gcc trunk. However I wasn't sure if the size of the shift on t in the return statement didn't need to be changed (or eliminated)? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29056