[PATCH] D41505: [DAG] Teach findBaseOffset to interpret indexes of indexed memory operations
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 08:18:47 PST 2018
jyknight accepted this revision.
jyknight added a comment.
This revision is now accepted and ready to land.
Looks reasonable to me, modulo style nit.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp:121
+ if (LSBase->isIndexed() &&
+ Base.getResNo() == (LSBase->getNumValues() - 2))
+ if (auto *C = dyn_cast<ConstantSDNode>(LSBase->getOffset())) {
----------------
This is a confusing way to write this. It gets the correct answer, but I'd prefer if the load/store result value numbers (0 for store, 1 for load) were just explicitly spelled out with a conditional.
https://reviews.llvm.org/D41505
More information about the llvm-commits
mailing list