[PATCH] D112877: [BasicTTI] getInterleavedMemoryOpCost(): discount unused members of mask if mask for gap will be used

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 03:21:01 PDT 2021


RKSimon added a comment.

LGTM (by inspection) - I tend to prefer to use the getScalarizationOverhead wrapper when we're using all the elements of the type, but I think it's better for consistency here to always specify the demanded elts.

Ideally we'd have at least some test coverage for this, but I understand mask gaps codegen can be tricky.



================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1241
            "Interleaved memory op has too many members");
 
     APInt DemandedLoadStoreElts = APInt::getZero(NumElts);
----------------
Worth pulling these out?

const APInt DemandedAllSubElts = APInt::getAllOnes(NumSubElts);
const APInt DemandedAllResultElts = APInt::getAllOnes(NumElts);


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112877



More information about the llvm-commits mailing list