[PATCH] D19268: [DAGCombiner] Do not remove the load of stored values when optimizations are disabled

Marianne Mailhot-Sarrasin via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 08:54:37 PDT 2016


mamai removed rL LLVM as the repository for this revision.
mamai updated this revision to Diff 55827.
mamai added a comment.

Fixed indentation.


http://reviews.llvm.org/D19268

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Index: lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -10076,7 +10076,8 @@
   // value.
   // TODO: Handle store large -> read small portion.
   // TODO: Handle TRUNCSTORE/LOADEXT
-  if (ISD::isNormalLoad(N) && !LD->isVolatile()) {
+  if (OptLevel != CodeGenOpt::None &&
+      ISD::isNormalLoad(N) && !LD->isVolatile()) {
     if (ISD::isNON_TRUNCStore(Chain.getNode())) {
       StoreSDNode *PrevST = cast<StoreSDNode>(Chain);
       if (PrevST->getBasePtr() == Ptr &&


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19268.55827.patch
Type: text/x-patch
Size: 626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160502/6fc8da93/attachment.bin>


More information about the llvm-commits mailing list