{
if (!MRI.isLiveIn(physReg)) {
MRI.addLiveIn(physReg, virtReg);
+ MF->front().addLiveIn(physReg);
BuildMI(MF->front(), MF->front().begin(), DebugLoc(),
TII->get(TargetOpcode::COPY), virtReg)
.addReg(physReg);
#include "AMDGPU.h"
#include "AMDGPULowerShaderInstructions.h"
+#include "AMDGPUUtil.h"
#include "AMDIL.h"
#include "AMDILInstrInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
unsigned newRegister = inputClass->getRegister(inputIndex);
unsigned dstReg = dst.getReg();
- preloadRegister(MI.getParent()->getParent(), TM.getInstrInfo(), newRegister,
- dstReg);
+ AMDGPU::utilAddLiveIn(MI.getParent()->getParent(), *MRI, TM.getInstrInfo(), newRegister, dstReg);
}
bool R600LowerShaderInstructionsPass::lowerSTORE_OUTPUT(MachineInstr &MI,