[llvm] [RFC][X86] Allow speculative BSR/BSF instructions on targets with CMOV (PR #102885)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 13:22:42 PDT 2024


goldsteinn wrote:

> Interesting, hopefully we can make use of that properly, even if we just support it with an opt-in feature flag.
> 
> I noticed that GCC doesn't use the ZF result from the BSF/BSR instruction and instead performs the zero-input calculation separately: https://rust.godbolt.org/z/oTf4fqWvs

I have to imagine thats just a missed optimization.

https://github.com/llvm/llvm-project/pull/102885


More information about the llvm-commits mailing list