diff options
| author | Nate Begeman <natebegeman@mac.com> | 2009-09-15 00:13:12 +0000 |
|---|---|---|
| committer | Nate Begeman <natebegeman@mac.com> | 2009-09-15 00:13:12 +0000 |
| commit | 02a685a914ea20bcd1444a7883cecf399bafa009 (patch) | |
| tree | 2bb7128020e531136bd9fe6a32a5a56fdb09cb37 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
| parent | 19c73288810deb7f8a70ce58d9e4d2a857bbc2bc (diff) | |
| download | bcm5719-llvm-02a685a914ea20bcd1444a7883cecf399bafa009.tar.gz bcm5719-llvm-02a685a914ea20bcd1444a7883cecf399bafa009.zip | |
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.
llvm-svn: 81813
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index ad599124fb8..8b9a5a5459d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/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)); |

