[PATCH] D57616: [DAGCombiner] Discard pointer info when combining extract_vector_elt of a vector load when the index isn't constant

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 1 22:09:16 PST 2019


craig.topper updated this revision to Diff 184896.
craig.topper added a comment.
Herald added a project: LLVM.

Preserve address space


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57616

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp


Index: lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -15644,7 +15644,9 @@
     Offset = DAG.getNode(
         ISD::MUL, DL, PtrType, Offset,
         DAG.getConstant(VecEltVT.getStoreSize(), DL, PtrType));
-    MPI = OriginalLoad->getPointerInfo();
+    // Discard the pointer info except the address space because the memory
+    // operand can't represent this new access since the offset is variable.
+    MPI = MachinePointerInfo(OriginalLoad->getPointerInfo().getAddrSpace());
   }
   NewPtr = DAG.getNode(ISD::ADD, DL, PtrType, NewPtr, Offset);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57616.184896.patch
Type: text/x-patch
Size: 709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190202/18317558/attachment.bin>


More information about the llvm-commits mailing list