diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-05-07 21:36:06 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-05-07 21:36:06 +0000 |
commit | 562e45692e588717148245e9a51b9eb361efd9bf (patch) | |
tree | 19ddb5d827f7a1655740cf0cc2c2a78a800b72c1 | |
parent | d37c23745fb3325396e15e9146a113aadcf8aa4c (diff) | |
download | llvm-562e45692e588717148245e9a51b9eb361efd9bf.tar.gz |
Forgot a check.
llvm-svn: 36910
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index e21655112149..290d621cf0ed 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/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()); } |