[PATCH] D109074: [Codegen][TLI][X86] SimplifyMultipleUseDemandedBits(): 0'th vec subreg widening is free, try to perform it earlier

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 14:22:20 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:822
   case ISD::INSERT_SUBVECTOR: {
     // If we don't demand the inserted subvector, return the base vector.
     SDValue Vec = Op.getOperand(0);
----------------
Move the comment down now that we do other things as well.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:832
+    if (Idx == 0 && Vec.isUndef()) {
+      APInt DemandedSubElts = DemandedElts.trunc(SubVT.getVectorNumElements());
+      if (SDValue NewSub = SimplifyMultipleUseDemandedBits(
----------------
Isn't this the same as DemandedElts.extractBits(NumSubElts, Idx)? Reuse a common variable? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109074



More information about the llvm-commits mailing list