[PATCH] D111507: [X86] Enable promotion of i16 popcnt (PR52056)

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 03:43:30 PDT 2021


xbolva00 added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:434
     setOperationPromotedToType(ISD::CTPOP, MVT::i8, MVT::i32);
+    setOperationPromotedToType(ISD::CTPOP, MVT::i16, MVT::i32);
   } else {
----------------
RKSimon wrote:
> xbolva00 wrote:
> > RKSimon wrote:
> > > Please add a comment explaining why we don't use popcntw
> > So something like for both i8/i16
> > 
> > "The 32-bit version is shorter to encode and the zext we emit for the promotion is likely going to be a 32-bit zero extend anyway." ?
> Shouldn't it only refer to i16?
> 
> "The 32-bit version is shorter to encode than popcntw, ..."
Yeah right :)


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

https://reviews.llvm.org/D111507



More information about the llvm-commits mailing list