[llvm-commits] [llvm] r53590 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Mon P Wang
wangmp at apple.com
Mon Jul 14 22:28:35 PDT 2008
Author: wangmp
Date: Tue Jul 15 00:28:34 2008
New Revision: 53590
URL: http://llvm.org/viewvc/llvm-project?rev=53590&view=rev
Log:
Fixed potential bug if the source and target of a bit convert have different alignment
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=53590&r1=53589&r2=53590&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Jul 15 00:28:34 2008
@@ -7015,7 +7015,9 @@
// 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(),
More information about the llvm-commits
mailing list