[PATCH] D49200: [DAGCombine] Improve Load-Store Forwarding
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 9 09:12:13 PDT 2018
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:12622
+static inline int numElems(EVT T) {
+ return T.isVector() ? T.getVectorNumElements() : 0;
+}
----------------
niravd wrote:
> RKSimon wrote:
> > Not sure if this is that useful (especially as similar helpers typically return 1 for scalars)?
> I have no strong opinions on this. The only reason for the zero is 0 is to distinguish a singleton vector and it's element type. It's saves having to check if compared types are both isVector or not isVector.
How about numVectorEltsOrZero ?
Repository:
rL LLVM
https://reviews.llvm.org/D49200
More information about the llvm-commits
mailing list