mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
TargetData doesn't know the alignment of vectors :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
abdff1ee6d
commit
54a30b9639
@ -20,6 +20,7 @@
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetInstrInfo.h"
|
||||
#include "llvm/Target/TargetLowering.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
using namespace llvm;
|
||||
|
||||
|
||||
@ -124,9 +125,15 @@ void ScheduleDAG::AddOperand(MachineInstr *MI, SDOperand Op,
|
||||
if (Align == 0) {
|
||||
if (CP->get()->getType() == Type::DoubleTy)
|
||||
Align = 3; // always 8-byte align doubles.
|
||||
else
|
||||
else {
|
||||
Align = TM.getTargetData()
|
||||
.getTypeAlignmentShift(CP->get()->getType());
|
||||
if (Align == 0) {
|
||||
// Alignment of packed types. FIXME!
|
||||
Align = TM.getTargetData().getTypeSize(CP->get()->getType());
|
||||
Align = Log2_64(Align);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsigned Idx = ConstPool->getConstantPoolIndex(CP->get(), Align);
|
||||
|
Loading…
Reference in New Issue
Block a user