------- Comment #1 from michael dot meissner at amd dot com 2007-02-03 04:49 ------- If you look at the RTL, in the if statement, the RTL loads the QI value into the register and does the test against the QI value, and the movzbl is how the load is done. The second movzbl is to zero extend the value into a SI value that can be used in the __builtin_ctz function.
In addition, there is a spurious move at the end to move the value from %edx into %eax for the return. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29775