Better solution for tracking both the original alignment of the access, and the current alignment based

on the source value offset.  This avoids increasing the size of mem nodes. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81897 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nate Begeman
2009-09-15 19:05:41 +00:00
parent 44ac22cb27
commit 101b25c028
5 changed files with 55 additions and 71 deletions

View File

@@ -2815,7 +2815,7 @@ void SelectionDAGLowering::visitLoad(LoadInst &I) {
DAG.getNode(ISD::ADD, getCurDebugLoc(),
PtrVT, Ptr,
DAG.getConstant(Offsets[i], PtrVT)),
SV, Offsets[i], isVolatile, Alignment, Alignment);
SV, Offsets[i], isVolatile, Alignment);
Values[i] = L;
Chains[i] = L.getValue(1);
}
@@ -2864,8 +2864,7 @@ void SelectionDAGLowering::visitStore(StoreInst &I) {
DAG.getNode(ISD::ADD, getCurDebugLoc(),
PtrVT, Ptr,
DAG.getConstant(Offsets[i], PtrVT)),
PtrV, Offsets[i],
isVolatile, Alignment, Alignment);
PtrV, Offsets[i], isVolatile, Alignment);
DAG.setRoot(DAG.getNode(ISD::TokenFactor, getCurDebugLoc(),
MVT::Other, &Chains[0], NumValues));