aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-16 02:04:50 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-16 02:04:50 +0000
commit93003b8cf221f084e71e2b4033c41ff2cae6c36d (patch)
tree9e67f805b586a1a7d51c60683ad4815e30e50b51 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent9307292ae27c125a10eabccb5a437200d831a55f (diff)
Bug fix: should check ABI alignment, not pref. alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index da0f8cffa9..2ea38e2090 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2685,7 +2685,7 @@ SDOperand DAGCombiner::visitBIT_CONVERT(SDNode *N) {
TLI.isOperationLegal(ISD::LOAD, VT)) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
unsigned Align = TLI.getTargetMachine().getTargetData()->
- getPrefTypeAlignment(getTypeForValueType(VT));
+ getABITypeAlignment(getTypeForValueType(VT));
unsigned OrigAlign = LN0->getAlignment();
if (Align <= OrigAlign) {
SDOperand Load = DAG.getLoad(VT, LN0->getChain(), LN0->getBasePtr(),
@@ -3564,7 +3564,7 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
unsigned Align = ST->getAlignment();
MVT::ValueType SVT = Value.getOperand(0).getValueType();
unsigned OrigAlign = TLI.getTargetMachine().getTargetData()->
- getPrefTypeAlignment(getTypeForValueType(SVT));
+ getABITypeAlignment(getTypeForValueType(SVT));
if (Align <= OrigAlign && TLI.isOperationLegal(ISD::STORE, SVT))
return DAG.getStore(Chain, Value.getOperand(0), Ptr, ST->getSrcValue(),
ST->getSrcValueOffset());