aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-02-11 10:37:04 +0000
committerDuncan Sands <baldrick@free.fr>2008-02-11 10:37:04 +0000
commit0753fc1850a1ca4d17acca854d830d67737fd623 (patch)
treeaab2531a40f5fd2b72f1c12ff0701d34b63cd97d /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent431bfcbe3746d1a427b4c7791140f88882a8e8d8 (diff)
Add a isBigEndian method to complement isLittleEndian.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 3a03f2c4bf..a2f36f33b4 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1739,7 +1739,7 @@ SDOperand DAGCombiner::visitAND(SDNode *N) {
unsigned PtrOff = LVTStoreBytes - EVTStoreBytes;
unsigned Alignment = LN0->getAlignment();
SDOperand NewPtr = LN0->getBasePtr();
- if (!TLI.isLittleEndian()) {
+ if (TLI.isBigEndian()) {
NewPtr = DAG.getNode(ISD::ADD, PtrType, NewPtr,
DAG.getConstant(PtrOff, PtrType));
Alignment = MinAlign(Alignment, PtrOff);
@@ -3086,7 +3086,7 @@ SDOperand DAGCombiner::ReduceLoadWidth(SDNode *N) {
MVT::ValueType PtrType = N0.getOperand(1).getValueType();
// For big endian targets, we need to adjust the offset to the pointer to
// load the correct bytes.
- if (!TLI.isLittleEndian()) {
+ if (TLI.isBigEndian()) {
unsigned LVTStoreBits = MVT::getStoreSizeInBits(N0.getValueType());
unsigned EVTStoreBits = MVT::getStoreSizeInBits(EVT);
ShAmt = LVTStoreBits - EVTStoreBits - ShAmt;
@@ -3460,7 +3460,7 @@ ConstantFoldBIT_CONVERTofBUILD_VECTOR(SDNode *BV, MVT::ValueType DstEltVT) {
}
// For big endian targets, swap the order of the pieces of each element.
- if (!TLI.isLittleEndian())
+ if (TLI.isBigEndian())
std::reverse(Ops.end()-NumOutputsPerInput, Ops.end());
}
MVT::ValueType VT = MVT::getVectorType(DstEltVT, Ops.size());
@@ -4386,7 +4386,7 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
uint64_t Val = CFP->getValueAPF().convertToAPInt().getZExtValue();
SDOperand Lo = DAG.getConstant(Val & 0xFFFFFFFF, MVT::i32);
SDOperand Hi = DAG.getConstant(Val >> 32, MVT::i32);
- if (!TLI.isLittleEndian()) std::swap(Lo, Hi);
+ if (TLI.isBigEndian()) std::swap(Lo, Hi);
int SVOffset = ST->getSrcValueOffset();
unsigned Alignment = ST->getAlignment();