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

steinar+gcc at gunderson dot no gcc-bugzilla@gcc.gnu.org
Sun Sep 29 11:54:00 GMT 2019


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

--- Comment #22 from Steinar H. Gunderson <steinar+gcc at gunderson dot no> ---
Yes; I had a project recently where I won 15% overall performance (!) by using
an asm statement with bsf instead of ffsll(). (This skipped both the sign
extension and the check for zero; my argument could never be zero, due to a
loop condition, but GCC didn't manage to remove the check nevertheless.)


More information about the Gcc-bugs mailing list