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 middle-end/36041] Speed up builtin_popcountll


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

--- Comment #11 from Cristian RodrÃguez <crrodriguez at opensuse dot org> ---
Not to be annoying, but compiling the test case attached to this bug report
with clang 3.3 produces code in where 

inline u32 popcount64_1(u64 x) { return __builtin_popcountll(x); }


is over 3 times faster than GCC 4.8.1 in x86_64.

I think GCC could "just" generate IFUNCS for generic targets , in x86_64 one
function with attribute target popcnt and the other a call to libgcc that at
least matches the clang performance.

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