- // Retrieve the constant value from this op, move it to target
- // register of the phi
- if (opVal.getType() == MachineOperand::MO_SignExtendedImmed ||
- opVal.getType() == MachineOperand::MO_UnextendedImmed)
- {
- opI = RegInfo->moveImm2Reg(opBlock, opI, physReg,
- (unsigned) opVal.getImmedValue(),
- dataSize);
- saveVirtRegToStack(opBlock, opI, virtualReg, physReg);
- } else {
- // Allocate a physical register and add a move in the BB
- unsigned opVirtualReg = (unsigned) opVal.getAllocatedRegNum();
- unsigned opPhysReg; // = getFreeReg(opVirtualReg);
- opI = moveUseToReg(opBlock, opI, opVirtualReg, opPhysReg);
- opI = RegInfo->moveReg2Reg(opBlock, opI, physReg, opPhysReg,
- dataSize);
- // Save that register value to the stack of the TARGET REG
- saveVirtRegToStack(opBlock, opI, virtualReg, opPhysReg);
- }
- }
+ opI = RegInfo->moveImm2Reg(opBlock, opI, physReg,
+ (unsigned) opVal.getImmedValue(),
+ dataSize);
+ saveVirtRegToStack(opBlock, opI, virtualReg, physReg);
+ } else {
+ // Allocate a physical register and add a move in the BB
+ unsigned opVirtualReg = (unsigned) opVal.getAllocatedRegNum();
+ unsigned opPhysReg; // = getFreeReg(opVirtualReg);
+ opI = moveUseToReg(opBlock, opI, opVirtualReg, physReg);
+ //opI = RegInfo->moveReg2Reg(opBlock, opI, physReg, opPhysReg,
+ // dataSize);
+ // Save that register value to the stack of the TARGET REG
+ saveVirtRegToStack(opBlock, opI, virtualReg, physReg);
+ }