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

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 01:47:21 PDT 2024


RKSimon 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.

Thanks for checking that - I'll see if I can update that patch to account it.

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


More information about the llvm-commits mailing list