summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorMon P Wang <wangmp@apple.com>2008-07-15 05:28:34 +0000
committerMon P Wang <wangmp@apple.com>2008-07-15 05:28:34 +0000
commit97432f4f1b33079780656d7964eb40d1aef80ddb (patch)
treeb18f723830e5cc85ccc9a35f68b43063c834ea12 /llvm/lib/CodeGen/SelectionDAG
parent41aeef5205e113f73f89adbbee1fcd093b14986e (diff)
downloadbcm5719-llvm-97432f4f1b33079780656d7964eb40d1aef80ddb.tar.gz
bcm5719-llvm-97432f4f1b33079780656d7964eb40d1aef80ddb.zip
Fixed potential bug if the source and target of a bit convert have different alignment
llvm-svn: 53590
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 632653b624d..4b9236db467 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -7015,7 +7015,9 @@ void SelectionDAGLegalize::SplitVectorOp(SDOperand Op, SDOperand &Lo,
// The input is a scalar or single-element vector.
// Lower to a store/load so that it can be split.
// FIXME: this could be improved probably.
- SDOperand Ptr = DAG.CreateStackTemporary(InOp.getValueType());
+ unsigned LdAlign = TLI.getTargetData()->getPrefTypeAlignment(
+ Op.getValueType().getTypeForMVT());
+ SDOperand Ptr = DAG.CreateStackTemporary(InOp.getValueType(), LdAlign);
int FI = cast<FrameIndexSDNode>(Ptr.Val)->getIndex();
SDOperand St = DAG.getStore(DAG.getEntryNode(),
OpenPOWER on IntegriCloud