Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.304 -> 1.305
---
Log message:

Bug fix: should check ABI alignment, not pref. alignment.

---
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.304 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.305
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.304 Tue May 15 12:05:43 2007
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp       Tue May 15 21:04:50 2007
@@ -2685,7 +2685,7 @@
       TLI.isOperationLegal(ISD::LOAD, VT)) {
     LoadSDNode *LN0 = cast<LoadSDNode>(N0);
     unsigned Align = TLI.getTargetMachine().getTargetData()->
-      getPrefTypeAlignment(getTypeForValueType(VT));
+      getABITypeAlignment(getTypeForValueType(VT));
     unsigned OrigAlign = LN0->getAlignment();
     if (Align <= OrigAlign) {
       SDOperand Load = DAG.getLoad(VT, LN0->getChain(), LN0->getBasePtr(),
@@ -3564,7 +3564,7 @@
     unsigned Align = ST->getAlignment();
     MVT::ValueType SVT = Value.getOperand(0).getValueType();
     unsigned OrigAlign = TLI.getTargetMachine().getTargetData()->
-      getPrefTypeAlignment(getTypeForValueType(SVT));
+      getABITypeAlignment(getTypeForValueType(SVT));
     if (Align <= OrigAlign && TLI.isOperationLegal(ISD::STORE, SVT))
       return DAG.getStore(Chain, Value.getOperand(0), Ptr, ST->getSrcValue(),
                           ST->getSrcValueOffset());



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to