[PATCH] D142100: [DAGCombine] Allow scalable type dead store elimination

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 05:08:09 PST 2023


sdesmalen added a comment.

Thanks for adding the tests. Just two more minor comments and then I'm happy to accept.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19824-19826
+        if (ST->getMemoryVT().isScalableVector() ||
+            ST1->getMemoryVT().isScalableVector()) {
+          if (ST1->getBasePtr() == Ptr &&
----------------
Can you combine the two if-statements with an `&&`? That saves a level of indentation.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19832
+          }
+        } else {
+          const BaseIndexOffset STBase = BaseIndexOffset::match(ST, DAG);
----------------
You can remove the `} else {` here, which saves a level of indentation.


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

https://reviews.llvm.org/D142100



More information about the llvm-commits mailing list