This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/29776] result of ffs/clz/ctz/popcount/parity are already sign-extended
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Jul 2012 12:48:19 +0000
- Subject: [Bug target/29776] result of ffs/clz/ctz/popcount/parity are already sign-extended
- Auto-submitted: auto-generated
- References: <bug-29776-4@http.gcc.gnu.org/bugzilla/>
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.