llvm.org GIT mirror llvm / 25b1419
When adding a register, we should mark it as "def" if it can optionally define said (physical) register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112461 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 10 years ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
252252 return I->second;
253253 }
254254
255
256255 /// AddRegisterOperand - Add the specified register as an operand to the
257256 /// specified machine instr. Insert register copies if the register is
258257 /// not in the required register class.
336335 const ConstantFP *CFP = F->getConstantFPValue();
337336 MI->addOperand(MachineOperand::CreateFPImm(CFP));
338337 } else if (RegisterSDNode *R = dyn_cast(Op)) {
339 MI->addOperand(MachineOperand::CreateReg(R->getReg(), false));
338 unsigned Reg = R->getReg();
339 const TargetInstrDesc &TID = MI->getDesc();
340 MI->addOperand(MachineOperand::CreateReg(Reg,
341 (Reg == 0 || !TID.OpInfo) ? false : TID.OpInfo[IIOpNum].isOptionalDef()));
340342 } else if (GlobalAddressSDNode *TGA = dyn_cast(Op)) {
341343 MI->addOperand(MachineOperand::CreateGA(TGA->getGlobal(), TGA->getOffset(),
342344 TGA->getTargetFlags()));