mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Make sure the alignment of the temporary created
in CreateStackStoreLoad is good enough for both the source and destination types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53404 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f4e4629ee8
commit
c5ffb45934
@ -16,6 +16,7 @@
|
||||
#include "LegalizeTypes.h"
|
||||
#include "llvm/CallingConv.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
using namespace llvm;
|
||||
|
||||
#ifndef NDEBUG
|
||||
@ -547,8 +548,11 @@ SDOperand DAGTypeLegalizer::BitConvertToInteger(SDOperand Op) {
|
||||
|
||||
SDOperand DAGTypeLegalizer::CreateStackStoreLoad(SDOperand Op,
|
||||
MVT DestVT) {
|
||||
// Create the stack frame object.
|
||||
SDOperand FIPtr = DAG.CreateStackTemporary(DestVT);
|
||||
// Create the stack frame object. Make sure it is aligned for both
|
||||
// the source and destination types.
|
||||
unsigned SrcAlign =
|
||||
TLI.getTargetData()->getPrefTypeAlignment(Op.getValueType().getTypeForMVT());
|
||||
SDOperand FIPtr = DAG.CreateStackTemporary(DestVT, SrcAlign);
|
||||
|
||||
// Emit a store to the stack slot.
|
||||
SDOperand Store = DAG.getStore(DAG.getEntryNode(), Op, FIPtr, NULL, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user