[Bug target/29776] result of ffs/clz/ctz/popcount/parity are already sign-extended

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 30 12:49:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29776

--- Comment #5 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-30 12:48:19 UTC ---
Created attachment 27895
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27895
Target patch that handles ctz extensions

x86 target patch that teaches gcc about extensions for ctz.

Patched gcc generates no extension for:

long long foo (int x) { return __builtin_ctz (x); }

and

int foo (long long x) { return __builtin_ctzll (x); }

(and their unsigned variants) on x86.



More information about the Gcc-bugs mailing list