[PATCH] D87883: [X86] Add support for calling SimplifyDemandedBits on the input of PDEP with a constant mask.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 04:19:59 PDT 2020


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:49499
+  if (auto *C = dyn_cast<ConstantSDNode>(Op1)) {
+    uint64_t Count = C->getAPIntValue().countPopulation();
+
----------------
RKSimon wrote:
> Can you move this functionality inside X86TargetLowering::SimplifyDemandedBitsForTargetNode?
> 
> Hopefully we can then expand it in the future to handle incoming DemandedBits masks as well to adjust the PDEP mask.
> 
> X86TargetLowering::computeKnownBitsForTargetNode support would be useful eventually as well.
Sure, but I don’t think it makes sense to move it without calculating the known bits based on the mask. So we’ll need more tests.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87883



More information about the llvm-commits mailing list