diff options
| author | Dan Gohman <gohman@apple.com> | 2009-02-20 23:29:13 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-02-20 23:29:13 +0000 |
| commit | e7fe80fcf927f94f39c4707acd3c4027b70d7745 (patch) | |
| tree | 491109086d19d3f3050a8df7eaef363d4893aeb8 | |
| parent | 0c4eda59238fcf858acabe0b9be70d503e79ac33 (diff) | |
| download | bcm5719-llvm-e7fe80fcf927f94f39c4707acd3c4027b70d7745.tar.gz bcm5719-llvm-e7fe80fcf927f94f39c4707acd3c4027b70d7745.zip | |
Fix a bug that David Greene found in the DAGCombiner's logic
that checks whether it's safe to transform a store of a bitcast
value into a store of the original value.
llvm-svn: 65201
| -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 976a9ccebc0..4b3935c2173 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4903,9 +4903,9 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) { // resultant store does not need a higher alignment than the original. if (Value.getOpcode() == ISD::BIT_CONVERT && !ST->isTruncatingStore() && ST->isUnindexed()) { - unsigned Align = ST->getAlignment(); + unsigned OrigAlign = ST->getAlignment(); MVT SVT = Value.getOperand(0).getValueType(); - unsigned OrigAlign = TLI.getTargetData()-> + unsigned Align = TLI.getTargetData()-> getABITypeAlignment(SVT.getTypeForMVT()); if (Align <= OrigAlign && ((!LegalOperations && !ST->isVolatile()) || |

