* Add the lost fix to define the second reg of a 2-reg representation of longs
* Fix opcode RLWNM -> RLWINM since it uses an immediate const shift value llvm-svn: 15087
This commit is contained in:
parent
87e07f8596
commit
dbd14bc3e5
|
|
@ -1154,6 +1154,9 @@ void ISel::emitSelectOperation(MachineBasicBlock *MBB,
|
||||||
BB = sinkMBB;
|
BB = sinkMBB;
|
||||||
BuildMI(BB, PPC32::PHI, 4, DestReg).addReg(FalseValue)
|
BuildMI(BB, PPC32::PHI, 4, DestReg).addReg(FalseValue)
|
||||||
.addMBB(copy0MBB).addReg(TrueValue).addMBB(copy1MBB);
|
.addMBB(copy0MBB).addReg(TrueValue).addMBB(copy1MBB);
|
||||||
|
// For a register pair representing a long value, define the second reg
|
||||||
|
if (getClass(TrueVal->getType()) == cLong)
|
||||||
|
BuildMI(BB, PPC32::LI, 1, DestReg+1).addImm(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2801,7 +2804,7 @@ void ISel::visitAllocaInst(AllocaInst &I) {
|
||||||
|
|
||||||
// AlignedSize = and <AddedSize>, ~15
|
// AlignedSize = and <AddedSize>, ~15
|
||||||
unsigned AlignedSize = makeAnotherReg(Type::UIntTy);
|
unsigned AlignedSize = makeAnotherReg(Type::UIntTy);
|
||||||
BuildMI(BB, PPC32::RLWNM, 4, AlignedSize).addReg(AddedSizeReg).addImm(0)
|
BuildMI(BB, PPC32::RLWINM, 4, AlignedSize).addReg(AddedSizeReg).addImm(0)
|
||||||
.addImm(0).addImm(27);
|
.addImm(0).addImm(27);
|
||||||
|
|
||||||
// Subtract size from stack pointer, thereby allocating some space.
|
// Subtract size from stack pointer, thereby allocating some space.
|
||||||
|
|
|
||||||
|
|
@ -1154,6 +1154,9 @@ void ISel::emitSelectOperation(MachineBasicBlock *MBB,
|
||||||
BB = sinkMBB;
|
BB = sinkMBB;
|
||||||
BuildMI(BB, PPC32::PHI, 4, DestReg).addReg(FalseValue)
|
BuildMI(BB, PPC32::PHI, 4, DestReg).addReg(FalseValue)
|
||||||
.addMBB(copy0MBB).addReg(TrueValue).addMBB(copy1MBB);
|
.addMBB(copy0MBB).addReg(TrueValue).addMBB(copy1MBB);
|
||||||
|
// For a register pair representing a long value, define the second reg
|
||||||
|
if (getClass(TrueVal->getType()) == cLong)
|
||||||
|
BuildMI(BB, PPC32::LI, 1, DestReg+1).addImm(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2801,7 +2804,7 @@ void ISel::visitAllocaInst(AllocaInst &I) {
|
||||||
|
|
||||||
// AlignedSize = and <AddedSize>, ~15
|
// AlignedSize = and <AddedSize>, ~15
|
||||||
unsigned AlignedSize = makeAnotherReg(Type::UIntTy);
|
unsigned AlignedSize = makeAnotherReg(Type::UIntTy);
|
||||||
BuildMI(BB, PPC32::RLWNM, 4, AlignedSize).addReg(AddedSizeReg).addImm(0)
|
BuildMI(BB, PPC32::RLWINM, 4, AlignedSize).addReg(AddedSizeReg).addImm(0)
|
||||||
.addImm(0).addImm(27);
|
.addImm(0).addImm(27);
|
||||||
|
|
||||||
// Subtract size from stack pointer, thereby allocating some space.
|
// Subtract size from stack pointer, thereby allocating some space.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue