aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-09 02:19:16 +0000
committerChris Lattner <sabre@nondot.org>2006-02-09 02:19:16 +0000
commit5ac38d147b3e37486c3f5a92a606fd78c241c9b8 (patch)
tree6e2194bb85489af44c1ee0655fa2196becfa04ea
parent23c574a841fce0082f61d3f7e0671bf27801bcc7 (diff)
downloadexternal_llvm-5ac38d147b3e37486c3f5a92a606fd78c241c9b8.tar.gz
external_llvm-5ac38d147b3e37486c3f5a92a606fd78c241c9b8.tar.bz2
external_llvm-5ac38d147b3e37486c3f5a92a606fd78c241c9b8.zip
Always pass in an alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26070 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/SparcV9BurgISel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/SparcV9/SparcV9BurgISel.cpp b/lib/Target/SparcV9/SparcV9BurgISel.cpp
index fd03641786..1c03a9eb86 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<Constant>(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;