[PATCH] D36158: [DAG] Allow merging of stores of vector loads
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 10:31:44 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13008
+ unsigned Elts =
+ (i + 1) * ((MemVT.isVector()) ? MemVT.getVectorNumElements() : 1);
+ EVT StoreTy = EVT::getVectorVT(Context, MemVT.getScalarType(), Elts);
----------------
Pull out
```
unsigned NumSrcMemElts = MemVT.isVector() ? MemVT.getVectorNumElements() : 1;
unsigned Elts = (i + 1) * NumSrcMemElts;
```
as you have a second MemVT.getVectorNumElements() call later on.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:13080
+ // Find a legal type for the vector store.
+ unsigned Elts = NumElem;
+ if (MemVT.isVector())
----------------
unsigned Elts = NumElem * NumSrcMemElts;
https://reviews.llvm.org/D36158
More information about the llvm-commits
mailing list