[PATCH] D68337: [ARM][MVE] Enable extending masked loads

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 10:30:00 PDT 2019


craig.topper added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9312
+  MaskedLoadSDNode *Ld = dyn_cast<MaskedLoadSDNode>(N0);
+  if (!Ld || Ld->getExtensionType())
+    return SDValue();
----------------
Check the extension type is NON_EXT explicitly. Don't rely on it being encoding 0.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9328
+                                      Ld->isExpandingLoad());
+  DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), SDValue(NewLoad.getNode(), 0));
+  DAG.ReplaceAllUsesOfValueWith(SDValue(Ld, 1), SDValue(NewLoad.getNode(), 1));
----------------
I don't think this line is needed. Returning NewLoad should take care of it. The line that replaces SDValue(Ld, 1) is needed though.


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

https://reviews.llvm.org/D68337





More information about the llvm-commits mailing list