aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-07 21:36:06 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-07 21:36:06 +0000
commitc2cd2b29f5b8e2eda88a1edadcd4bc7478a2439c (patch)
tree1bc3be1133c0b08b9dd4cedf75ca7d919e23aa60 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentc4e600362e0adec4660c317e0f87e4344e76f139 (diff)
Forgot a check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index e216551121..290d621cf0 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3428,7 +3428,7 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
MVT::ValueType SVT = Value.getOperand(0).getValueType();
unsigned OrigAlign = TLI.getTargetMachine().getTargetData()->
getPrefTypeAlignment(getTypeForValueType(SVT));
- if (Align <= OrigAlign)
+ if (Align <= OrigAlign && TLI.isOperationLegal(ISD::STORE, SVT))
return DAG.getStore(Chain, Value.getOperand(0), Ptr, ST->getSrcValue(),
ST->getSrcValueOffset());
}