[PATCH] D49200: [DAGCombine] Improve Load-Store Forwarding
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 14 03:19:04 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;
+}
----------------
Not sure if this is that useful (especially as similar helpers typically return 1 for scalars)?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:12626
+bool DAGCombiner::getTruncatedStoreValue(StoreSDNode *ST, SDValue &Val) {
+ Val = ST->getValue();
+ EVT STType = Val.getValueType();
----------------
Should you update Val even if you return false?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:12661
+ Val = DAG.getBitcast(LDType, Val);
+ case ISD::EXTLOAD:
+ Val = DAG.getNode(ISD::ANY_EXTEND, SDLoc(LD), LDType, Val);
----------------
I think you need breaks here, else add LLVM_FALLTHROUGHs
Repository:
rL LLVM
https://reviews.llvm.org/D49200
More information about the llvm-commits
mailing list