Make CodeGen/PowerPC/2007-09-11-RegCoalescerAssert.ll pass with the verifier.

llvm-svn: 131627
This commit is contained in:
Cameron Zwarich 2011-05-19 03:11:06 +00:00
parent dadd73390f
commit 41025dc95b
1 changed files with 2 additions and 1 deletions

View File

@ -1010,7 +1010,8 @@ bool PPCTargetLowering::SelectAddressRegImmShift(SDValue N, SDValue &Disp,
short Imm;
if (isIntS16Immediate(CN, Imm)) {
Disp = DAG.getTargetConstant((unsigned short)Imm >> 2, getPointerTy());
Base = DAG.getRegister(PPC::R0, CN->getValueType(0));
Base = DAG.getRegister(PPCSubTarget.isPPC64() ? PPC::X0 : PPC::R0,
CN->getValueType(0));
return true;
}