summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/R600ISelLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeon/R600ISelLowering.cpp')
-rw-r--r--src/gallium/drivers/radeon/R600ISelLowering.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeon/R600ISelLowering.cpp b/src/gallium/drivers/radeon/R600ISelLowering.cpp
index 7e1c17dfcaf..bee59cc0d7b 100644
--- a/src/gallium/drivers/radeon/R600ISelLowering.cpp
+++ b/src/gallium/drivers/radeon/R600ISelLowering.cpp
@@ -100,13 +100,12 @@ MachineBasicBlock * R600TargetLowering::EmitInstrWithCustomInserter(
case AMDIL::STORE_OUTPUT:
{
MachineBasicBlock::iterator I = *MI;
- int64_t OutputIndex = MI->getOperand(2).getImm();
+ int64_t OutputIndex = MI->getOperand(1).getImm();
unsigned OutputReg = AMDIL::R600_TReg32RegClass.getRegister(OutputIndex);
BuildMI(*BB, I, BB->findDebugLoc(I), TII->get(AMDIL::COPY), OutputReg)
- .addOperand(MI->getOperand(1));
+ .addOperand(MI->getOperand(0));
- MRI.replaceRegWith(MI->getOperand(0).getReg(), OutputReg);
if (!MRI.isLiveOut(OutputReg)) {
MRI.addLiveOut(OutputReg);
}