[PATCH] D19202: [PR27390] [CodeGen] Reject indexed loads in CombinerDAG.

Marcin Koƛcielnicki via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 08:40:13 PDT 2016


koriakin added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6964
@@ -6963,1 +6963,3 @@
     return false;
+  if (LD->isIndexed() || Base->isIndexed())
+    return false;
----------------
koriakin wrote:
> hfinkel wrote:
> > Okay. Please check in DAGCombiner::CombineConsecutiveLoads instead. Otherwise, LGTM.
> Hmm, I'm not sure the logic in areNonVolatileConsecutiveLoads works right in the presence of indexed load anyhow (in particular, pre-indexing needs to be taken into account).  I'll take a look.
Right, areNonVolatileConsecutiveLoads is incorrect for pre-indexed loads - it only takes getOperand(1) into account.  So even if some caller can handle the indexing, it'll provide wrong answers.


Repository:
  rL LLVM

http://reviews.llvm.org/D19202





More information about the llvm-commits mailing list