aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-09 21:49:47 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-09 21:49:47 +0000
commit2c4f94363a02f482ddcfccc343978595a8a79438 (patch)
tree3965d3250aaa01e96043e0e519234a0e36101ba9 /lib
parent7294b58ecdb430d1473d0a9220a234e62a710d54 (diff)
Can't fold the bit_convert is the store is a truncating store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-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 290d621cf0..744a474ba4 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/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()->