[PATCH] D93610: [LegalizeType] When LegalizeType procedure widens a masked_gather, set MemoryType equal to ResultType
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 21 18:25:44 PST 2020
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:4906
+ // Widen the MemoryType
+ WideMemVT = EVT::getVectorVT(*DAG.getContext(),
+ MSC->getMemoryVT().getScalarType(), NumElts);
----------------
yubing wrote:
> craig.topper wrote:
> > This needs to be widened for OpNo == 4 as well otherwise it would have a different element count.
> Eh, You mean we should make MemType's EltNum equal to index's EltNum instead of ResultType's EltNum?
> But in fact, index and result can have different element number and index's upper element is ignored as mentioned in https://reviews.llvm.org/D51337.
Oh you're right. I forgot that was allowed now. It used to not be in the original implementation. So disregard.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93610/new/
https://reviews.llvm.org/D93610
More information about the llvm-commits
mailing list