https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124838
--- Comment #7 from Zoltan Hidvegi <zoltan at hidvegi dot com> --- clang generates a single lzcnt for both. And it seems that clearing EAX before lzcnt is unnecessary, I thought that unlike bsr, lzcnt does not have the false dependency on the old value of EAX. clang skips clearing eax. The testcase in #0 returns a different value at 0, so the cmov cannot be optimized.
