[PATCH] D62890: [DAGCombiner] Merge consecutive stores of vector elements before types are legalized

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 01:26:46 PDT 2019


lkail added a comment.

Considering suggestions of @niravd and @uweigand , is it proper to have an implementation like

  bool DAGCombiner::isAbleToMergeConsecutiveStoresPreLegalize(ArrayRef<SNode*> elements, .../* Params related to align, addrspace and etc.*/) {
    if (LegalTypes)
      return false;
    // Let target decides cost of merging stores.
    return TLI.canMergeConsecutiveStoresOfVectorElements(elements, ...);
  }

And new check is

  if (isTypeLegal(Ty) &&
      TLI.canMergeStoresTo(FirstStoreAS, Ty, DAG) &&
      ((TLI.allowsMemoryAccess(Context, DL, Ty,
                             *FirstInChain->getMemOperand(), &IsFast) &&
        IsFast) || isAbleToMergeConsecutiveStoresPreLegalize(elements, ...))


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62890





More information about the llvm-commits mailing list