[PATCH] D41701: [DAG] Teach BaseIndexOffset to correctly handle with indexed operations

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 12:38:55 PST 2018

efriedma added a comment.

I would prefer to have a regression test, but it's okay if you can't come up with a way to write one.

Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp:90
+    else // If unknown, give up now.
+      return BaseIndexOffset(Base, Index, Offset, IsIndexSignExt);
+  } else if (N->getAddressingMode() == ISD::PRE_DEC) {
Does this need to be something like "BaseIndexOffset(Base, N->getOffset(), 0, false);"?  Currently, it looks like this code is discarding the increment.


More information about the llvm-commits mailing list