forked from OSchip/llvm-project
[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
This commit is contained in:
parent
cdacffe4ac
commit
15bff4dec4
|
@ -1006,7 +1006,8 @@ void DAGTypeLegalizer::IncrementPointer(MemSDNode *N, EVT MemVT,
|
||||||
Flags.setNoUnsignedWrap(true);
|
Flags.setNoUnsignedWrap(true);
|
||||||
if (ScaledOffset)
|
if (ScaledOffset)
|
||||||
*ScaledOffset += IncrementSize;
|
*ScaledOffset += IncrementSize;
|
||||||
Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, BytesIncrement);
|
Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr, BytesIncrement,
|
||||||
|
Flags);
|
||||||
} else {
|
} else {
|
||||||
MPI = N->getPointerInfo().getWithOffset(IncrementSize);
|
MPI = N->getPointerInfo().getWithOffset(IncrementSize);
|
||||||
// Increment the pointer to the other half.
|
// Increment the pointer to the other half.
|
||||||
|
|
Loading…
Reference in New Issue