diff options
author | Tom Stellard <[email protected]> | 2012-05-08 10:27:30 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-05-08 15:47:46 -0400 |
commit | 94e797d0faed18dfa80bcce7a6d03ef369b6a820 (patch) | |
tree | d63e5a68256f54fe68ab29042b2b3d4cfe35be7b /src/gallium/drivers/radeon/R600ISelLowering.cpp | |
parent | 4226433625f7f1cbfff0503397adf74c6076b7f4 (diff) |
radeon/llvm: Use a custom inserter to lower STORE_OUTPUT
Diffstat (limited to 'src/gallium/drivers/radeon/R600ISelLowering.cpp')
-rw-r--r-- | src/gallium/drivers/radeon/R600ISelLowering.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/R600ISelLowering.cpp b/src/gallium/drivers/radeon/R600ISelLowering.cpp index d35669e1174..9870b7ba820 100644 --- a/src/gallium/drivers/radeon/R600ISelLowering.cpp +++ b/src/gallium/drivers/radeon/R600ISelLowering.cpp @@ -96,6 +96,22 @@ MachineBasicBlock * R600TargetLowering::EmitInstrWithCustomInserter( MI->eraseFromParent(); break; } + case AMDIL::STORE_OUTPUT: + { + MachineBasicBlock::iterator I = *MI; + int64_t OutputIndex = MI->getOperand(2).getImm(); + unsigned OutputReg = AMDIL::R600_TReg32RegClass.getRegister(OutputIndex); + + BuildMI(*BB, I, BB->findDebugLoc(I), TII->get(AMDIL::COPY), OutputReg) + .addOperand(MI->getOperand(1)); + + MRI.replaceRegWith(MI->getOperand(0).getReg(), OutputReg); + if (!MRI.isLiveOut(OutputReg)) { + MRI.addLiveOut(OutputReg); + } + MI->eraseFromParent(); + break; + } } return BB; } |