From: Chris Lattner Date: Thu, 9 Feb 2006 02:19:16 +0000 (+0000) Subject: Always pass in an alignment. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5ac38d147b3e37486c3f5a92a606fd78c241c9b8;p=oota-llvm.git Always pass in an alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26070 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SparcV9/SparcV9BurgISel.cpp b/lib/Target/SparcV9/SparcV9BurgISel.cpp index fd03641786b..1c03a9eb869 100644 --- a/lib/Target/SparcV9/SparcV9BurgISel.cpp +++ b/lib/Target/SparcV9/SparcV9BurgISel.cpp @@ -1139,7 +1139,8 @@ void CreateCodeToLoadConst(const TargetMachine& target, Function* F, // Get the constant pool index for this constant MachineConstantPool *CP = MachineFunction::get(F).getConstantPool(); Constant *C = cast(val); - unsigned CPI = CP->getConstantPoolIndex(C); + unsigned Align = target.getTargetData().getTypeAlignmentShift(C->getType()); + unsigned CPI = CP->getConstantPoolIndex(C, Align); // Put the address of the constant into a register MachineInstr* MI;