diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-05-09 21:49:47 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-05-09 21:49:47 +0000 |
commit | f325c2a65e9f292b3b5823c6ba5e7d8c35681bd2 (patch) | |
tree | f3b086cc95b09bb4ce19c893e3a1b5e4bb26a4dc /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | 192d09c2d9feaa79d369cac6d44bb07ee64e6f3c (diff) | |
download | bcm5719-llvm-f325c2a65e9f292b3b5823c6ba5e7d8c35681bd2.tar.gz bcm5719-llvm-f325c2a65e9f292b3b5823c6ba5e7d8c35681bd2.zip |
Can't fold the bit_convert is the store is a truncating store.
llvm-svn: 36962
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 290d621cf0e..744a474ba4e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3422,8 +3422,8 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) { SDOperand Ptr = ST->getBasePtr(); // If this is a store of a bit convert, store the input value if the - // resultant store does not need a higher alignment than the original. - if (Value.getOpcode() == ISD::BIT_CONVERT) { + // resultant store does not need a higher alignment than the original. + if (Value.getOpcode() == ISD::BIT_CONVERT && !ST->isTruncatingStore()) { unsigned Align = ST->getAlignment(); MVT::ValueType SVT = Value.getOperand(0).getValueType(); unsigned OrigAlign = TLI.getTargetMachine().getTargetData()-> |