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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 14:13:45 PDT 2024


topperc wrote:

> Does a 32 bit BSF/BSR with an input of 0 still zero the upper 32 bits of the "unmodified" destination like any other 32 bit instruction? If not we need to make sure we don't remove any zero extend operations after a BSF/BSR with an input of 0.

I just checked on an Intel CPU. 32-bit bsf preserves the upper 32 bits of the destination. So its different than other 32-bit instructions.

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


More information about the llvm-commits mailing list