Disable constant-offset folding for PowerPC, as the PowerPC target

isn't yet prepared for it.

llvm-svn: 57886
This commit is contained in:
Dan Gohman 2008-10-21 03:41:46 +00:00
parent 847a83dbad
commit e49a93ccea
2 changed files with 8 additions and 0 deletions

View File

@ -4912,3 +4912,9 @@ SDValue PPCTargetLowering::LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) {
return DAG.getCopyFromReg(DAG.getEntryNode(), is31 ? PPC::R31 : PPC::R1,
MVT::i32);
}
bool
PPCTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
// The PowerPC target isn't yet aware of offsets.
return false;
}

View File

@ -329,6 +329,8 @@ namespace llvm {
SDValue Ret,
SelectionDAG &DAG) const;
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
private:
SDValue getFramePointerFrameIndex(SelectionDAG & DAG) const;
SDValue getReturnAddrFrameIndex(SelectionDAG & DAG) const;