This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]