aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2009-09-15 00:13:12 +0000
committerNate Begeman <natebegeman@mac.com>2009-09-15 00:13:12 +0000
commite6798372ea38e5ea24c26282a0d69aa6e3829854 (patch)
tree6804a507d42394c643182543005d5ad548d4faaf /lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
parent264d245851173bbace9281a2378a6cc51162b030 (diff)
Add an "original alignment" field to load and store nodes. This enables the
DAG Combiner to disambiguate chains for loads and stores of types which are broken up by the Legalizer into smaller pieces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index ad599124fb..8b9a5a5459 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -2812,11 +2812,10 @@ void SelectionDAGLowering::visitLoad(LoadInst &I) {
EVT PtrVT = Ptr.getValueType();
for (unsigned i = 0; i != NumValues; ++i) {
SDValue L = DAG.getLoad(ValueVTs[i], getCurDebugLoc(), Root,
- DAG.getNode(ISD::ADD, getCurDebugLoc(),
- PtrVT, Ptr,
- DAG.getConstant(Offsets[i], PtrVT)),
- SV, Offsets[i],
- isVolatile, Alignment);
+ DAG.getNode(ISD::ADD, getCurDebugLoc(),
+ PtrVT, Ptr,
+ DAG.getConstant(Offsets[i], PtrVT)),
+ SV, Offsets[i], isVolatile, Alignment, Alignment);
Values[i] = L;
Chains[i] = L.getValue(1);
}
@@ -2866,7 +2865,7 @@ void SelectionDAGLowering::visitStore(StoreInst &I) {
PtrVT, Ptr,
DAG.getConstant(Offsets[i], PtrVT)),
PtrV, Offsets[i],
- isVolatile, Alignment);
+ isVolatile, Alignment, Alignment);
DAG.setRoot(DAG.getNode(ISD::TokenFactor, getCurDebugLoc(),
MVT::Other, &Chains[0], NumValues));