[PATCH] D58468: [DAGCombine] Fold overlapping constant stores

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 11:56:33 PST 2019


rnk added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/SelectionDAGAddressAnalysis.h:67
+                const SelectionDAG &DAG) const {
+    int64_t Offset = 0;
+    return contains(Size, Other, OtherSize, DAG, Offset);
----------------
Why zero initialize here but not in the other call site? It gives the impression that it reads it as an input, but it doesn't.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:15444
+        // not affect those nodes.
+        // FIXME: We should be able to do this for Big Endian as well.
+        int64_t Offset;
----------------
Implementing this FIXME is just a matter of changing the `Offset * 8` calculation below, right? And, updating test cases, of course. If so, I think it's easy enough to be worth implementing just for completeness.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D58468





More information about the llvm-commits mailing list