[llvm] 15bff4d - [CodeGen] Fix bug in IncrementPointer

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 00:08:13 PDT 2020


Author: David Sherwood
Date: 2020-09-14T08:03:55+01:00
New Revision: 15bff4dec4360985a6a058a7e42a4ffd590dc665

URL: https://github.com/llvm/llvm-project/commit/15bff4dec4360985a6a058a7e42a4ffd590dc665
DIFF: https://github.com/llvm/llvm-project/commit/15bff4dec4360985a6a058a7e42a4ffd590dc665.diff

LOG: [CodeGen] Fix bug in IncrementPointer

In an earlier patch I meant to add the correct flags to the ADD
node when incrementing the pointer, but forgot to pass them to
SelectionDAG::getNode.

Differential Revision: https://reviews.llvm.org/D87496

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 9d82d2ed8ec5..b09303e5219e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -1006,7 +1006,8 @@ void DAGTypeLegalizer::IncrementPointer(MemSDNode *N, EVT MemVT,
     Flags.setNoUnsignedWrap(true);
     if (ScaledOffset)
       *ScaledOffset += IncrementSize;
-    Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, BytesIncrement);
+    Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, BytesIncrement,
+                      Flags);
   } else {
     MPI = N->getPointerInfo().getWithOffset(IncrementSize);
     // Increment the pointer to the other half.


        


More information about the llvm-commits mailing list