[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Evan Cheng evan.cheng at apple.com
Wed May 9 14:50:05 PDT 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.301 -> 1.302
---
Log message:

Can't fold the bit_convert is the store is a truncating store.

---
Diffs of the changes:  (+2 -2)

 DAGCombiner.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.301 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.302
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.301	Mon May  7 16:36:06 2007
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Wed May  9 16:49:47 2007
@@ -3422,8 +3422,8 @@
   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()->






More information about the llvm-commits mailing list