diff options
author | Nirav Dave <niravd@google.com> | 2016-09-22 17:28:43 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2016-09-22 17:28:43 +0000 |
commit | 9011da3d4439ae1fda8283e8f76060b1d38ee61b (patch) | |
tree | 3bc0c636cfe069fcdb13be9ba873e1c1f220b8ca /llvm/lib | |
parent | 1998ee53f03bd70e811760a6aeb583ee4f4b033a (diff) | |
download | bcm5719-llvm-9011da3d4439ae1fda8283e8f76060b1d38ee61b.tar.gz bcm5719-llvm-9011da3d4439ae1fda8283e8f76060b1d38ee61b.zip |
[DAG] Fix incorrect alignment of ext load.
Correctly use alignment size from loaded size not output value size.
Reviewers: jyknight, tstellarAMD, arsenm
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23356
llvm-svn: 282177
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 78334fb36d8..c3d5bee091e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -5057,7 +5057,7 @@ SDValue SelectionDAG::getLoad(ISD::MemIndexedMode AM, ISD::LoadExtType ExtType, assert(Chain.getValueType() == MVT::Other && "Invalid chain type"); if (Alignment == 0) // Ensure that codegen never sees alignment 0 - Alignment = getEVTAlignment(VT); + Alignment = getEVTAlignment(MemVT); MMOFlags |= MachineMemOperand::MOLoad; assert((MMOFlags & MachineMemOperand::MOStore) == 0); |