Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.283 -> 1.284 SelectionDAG.cpp updated: 1.393 -> 1.394 --- Log message: Fix incorrect combination of different loads. Reenable zext-over-truncate combination. --- Diffs of the changes: (+71 -75) DAGCombiner.cpp | 4 - SelectionDAG.cpp | 142 +++++++++++++++++++++++++++---------------------------- 2 files changed, 71 insertions(+), 75 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.283 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.284 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.283 Thu Mar 29 02:56:46 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Mar 30 16:38:07 2007 @@ -2110,9 +2110,7 @@ // fold (zext (truncate (load x))) -> (zext (smaller load x)) // fold (zext (truncate (srl (load x), c))) -> (zext (small load (x+c/n))) - // FIXME: Temporarily disable this for big endian machines until llvm-gcc - // build issue has been resolved. - if (TLI.isLittleEndian() && N0.getOpcode() == ISD::TRUNCATE) { + if (N0.getOpcode() == ISD::TRUNCATE) { SDOperand NarrowLoad = ReduceLoadWidth(N0.Val); if (NarrowLoad.Val) { if (NarrowLoad.Val != N0.Val) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.393 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.394 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.393 Sun Mar 4 14:40:38 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Mar 30 16:38:07 2007 @@ -285,78 +285,76 @@ AddNodeIDOperands(ID, N->op_begin(), N->getNumOperands()); // Handle SDNode leafs with special info. - if (N->getNumOperands() == 0) { - switch (N->getOpcode()) { - default: break; // Normal nodes don't need extra info. - case ISD::TargetConstant: - case ISD::Constant: - ID.AddInteger(cast<ConstantSDNode>(N)->getValue()); - break; - case ISD::TargetConstantFP: - case ISD::ConstantFP: - ID.AddDouble(cast<ConstantFPSDNode>(N)->getValue()); - break; - case ISD::TargetGlobalAddress: - case ISD::GlobalAddress: { - GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(N); - ID.AddPointer(GA->getGlobal()); - ID.AddInteger(GA->getOffset()); - break; - } - case ISD::BasicBlock: - ID.AddPointer(cast<BasicBlockSDNode>(N)->getBasicBlock()); - break; - case ISD::Register: - ID.AddInteger(cast<RegisterSDNode>(N)->getReg()); - break; - case ISD::SRCVALUE: { - SrcValueSDNode *SV = cast<SrcValueSDNode>(N); - ID.AddPointer(SV->getValue()); - ID.AddInteger(SV->getOffset()); - break; - } - case ISD::FrameIndex: - case ISD::TargetFrameIndex: - ID.AddInteger(cast<FrameIndexSDNode>(N)->getIndex()); - break; - case ISD::JumpTable: - case ISD::TargetJumpTable: - ID.AddInteger(cast<JumpTableSDNode>(N)->getIndex()); - break; - case ISD::ConstantPool: - case ISD::TargetConstantPool: { - ConstantPoolSDNode *CP = cast<ConstantPoolSDNode>(N); - ID.AddInteger(CP->getAlignment()); - ID.AddInteger(CP->getOffset()); - if (CP->isMachineConstantPoolEntry()) - CP->getMachineCPVal()->AddSelectionDAGCSEId(ID); - else - ID.AddPointer(CP->getConstVal()); - break; - } - case ISD::LOAD: { - LoadSDNode *LD = cast<LoadSDNode>(N); - ID.AddInteger(LD->getAddressingMode()); - ID.AddInteger(LD->getExtensionType()); - ID.AddInteger(LD->getLoadedVT()); - ID.AddPointer(LD->getSrcValue()); - ID.AddInteger(LD->getSrcValueOffset()); - ID.AddInteger(LD->getAlignment()); - ID.AddInteger(LD->isVolatile()); - break; - } - case ISD::STORE: { - StoreSDNode *ST = cast<StoreSDNode>(N); - ID.AddInteger(ST->getAddressingMode()); - ID.AddInteger(ST->isTruncatingStore()); - ID.AddInteger(ST->getStoredVT()); - ID.AddPointer(ST->getSrcValue()); - ID.AddInteger(ST->getSrcValueOffset()); - ID.AddInteger(ST->getAlignment()); - ID.AddInteger(ST->isVolatile()); - break; - } - } + switch (N->getOpcode()) { + default: break; // Normal nodes don't need extra info. + case ISD::TargetConstant: + case ISD::Constant: + ID.AddInteger(cast<ConstantSDNode>(N)->getValue()); + break; + case ISD::TargetConstantFP: + case ISD::ConstantFP: + ID.AddDouble(cast<ConstantFPSDNode>(N)->getValue()); + break; + case ISD::TargetGlobalAddress: + case ISD::GlobalAddress: { + GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(N); + ID.AddPointer(GA->getGlobal()); + ID.AddInteger(GA->getOffset()); + break; + } + case ISD::BasicBlock: + ID.AddPointer(cast<BasicBlockSDNode>(N)->getBasicBlock()); + break; + case ISD::Register: + ID.AddInteger(cast<RegisterSDNode>(N)->getReg()); + break; + case ISD::SRCVALUE: { + SrcValueSDNode *SV = cast<SrcValueSDNode>(N); + ID.AddPointer(SV->getValue()); + ID.AddInteger(SV->getOffset()); + break; + } + case ISD::FrameIndex: + case ISD::TargetFrameIndex: + ID.AddInteger(cast<FrameIndexSDNode>(N)->getIndex()); + break; + case ISD::JumpTable: + case ISD::TargetJumpTable: + ID.AddInteger(cast<JumpTableSDNode>(N)->getIndex()); + break; + case ISD::ConstantPool: + case ISD::TargetConstantPool: { + ConstantPoolSDNode *CP = cast<ConstantPoolSDNode>(N); + ID.AddInteger(CP->getAlignment()); + ID.AddInteger(CP->getOffset()); + if (CP->isMachineConstantPoolEntry()) + CP->getMachineCPVal()->AddSelectionDAGCSEId(ID); + else + ID.AddPointer(CP->getConstVal()); + break; + } + case ISD::LOAD: { + LoadSDNode *LD = cast<LoadSDNode>(N); + ID.AddInteger(LD->getAddressingMode()); + ID.AddInteger(LD->getExtensionType()); + ID.AddInteger(LD->getLoadedVT()); + ID.AddPointer(LD->getSrcValue()); + ID.AddInteger(LD->getSrcValueOffset()); + ID.AddInteger(LD->getAlignment()); + ID.AddInteger(LD->isVolatile()); + break; + } + case ISD::STORE: { + StoreSDNode *ST = cast<StoreSDNode>(N); + ID.AddInteger(ST->getAddressingMode()); + ID.AddInteger(ST->isTruncatingStore()); + ID.AddInteger(ST->getStoredVT()); + ID.AddPointer(ST->getSrcValue()); + ID.AddInteger(ST->getSrcValueOffset()); + ID.AddInteger(ST->getAlignment()); + ID.AddInteger(ST->isVolatile()); + break; + } } } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits