diff options
author | Duncan Sands <baldrick@free.fr> | 2008-12-04 18:08:40 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-12-04 18:08:40 +0000 |
commit | 9304f2c294752a3cfbc2c91ebed903cc53317dc1 (patch) | |
tree | aeafc995f83dc9f9587a5838241f0753e5098d66 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 23f2ff74b1b44bec7e5a95199973fc978c8351c2 (diff) |
When allocating a stack temporary, use the correct
number of bytes for types such as i1 which are not
a multiple of 8 bits in length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 2c25596d76..6fc2a67e29 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1237,7 +1237,7 @@ SDValue SelectionDAG::getMemOperand(const MachineMemOperand &MO) { /// specified value type. SDValue SelectionDAG::CreateStackTemporary(MVT VT, unsigned minAlign) { MachineFrameInfo *FrameInfo = getMachineFunction().getFrameInfo(); - unsigned ByteSize = VT.getSizeInBits()/8; + unsigned ByteSize = VT.getStoreSizeInBits()/8; const Type *Ty = VT.getTypeForMVT(); unsigned StackAlign = std::max((unsigned)TLI.getTargetData()->getPrefTypeAlignment(Ty), minAlign); |