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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 03:28:17 PDT 2021


RKSimon 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 {
----------------
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, ..."


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

https://reviews.llvm.org/D111507



More information about the llvm-commits mailing list