[PATCH] D130995: [X86] Promote i16 CTTZ/CTTZ_ZERO_UNDEF always.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 09:37:30 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/X86/clz.ll:570
 ; X86-NEXT:  # %bb.2: # %cond.false
-; X86-NEXT:    bsfw %ax, %ax
+; X86-NEXT:    bsfl %eax, %eax
+; X86-NEXT:    # kill: def $ax killed $ax killed $eax
----------------
RKSimon wrote:
> Would it not be better to just perform the OR %EAX, $65536 and avoid the cmp+branch entirely?
isCheapToSpeculateCTTZ() doesn't give type based control.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130995/new/

https://reviews.llvm.org/D130995



More information about the llvm-commits mailing list