diff options
author | Tom Stellard <[email protected]> | 2012-05-31 15:58:17 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-06-01 11:28:10 -0400 |
commit | 883a0af53a2a4ef612e31b61a22fa4443121a2b8 (patch) | |
tree | de1a145c86f59d4f36dbb4974e2b8c8e37d10975 /src/gallium/drivers/radeon/R600ISelLowering.cpp | |
parent | f2781271c735fcdf94ed2dd831a7fa3a854deae5 (diff) |
radeon/llvm: Remove AMDIL GLOBALSTORE* instructions
Diffstat (limited to 'src/gallium/drivers/radeon/R600ISelLowering.cpp')
-rw-r--r-- | src/gallium/drivers/radeon/R600ISelLowering.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/R600ISelLowering.cpp b/src/gallium/drivers/radeon/R600ISelLowering.cpp index 1d4747fcfbe..9f9f348fc9e 100644 --- a/src/gallium/drivers/radeon/R600ISelLowering.cpp +++ b/src/gallium/drivers/radeon/R600ISelLowering.cpp @@ -146,6 +146,29 @@ MachineBasicBlock * R600TargetLowering::EmitInstrWithCustomInserter( return BB; } + case AMDIL::RAT_WRITE_CACHELESS_eg: + { + // Convert to DWORD address + unsigned NewAddr = MRI.createVirtualRegister( + AMDIL::R600_TReg32_XRegisterClass); + unsigned ShiftValue = MRI.createVirtualRegister( + AMDIL::R600_TReg32RegisterClass); + + // XXX In theory, we should be able to pass ShiftValue directly to + // the LSHR_eg instruction as an inline literal, but I tried doing it + // this way and it didn't produce the correct results. + BuildMI(*BB, I, BB->findDebugLoc(I), TII->get(AMDIL::MOV), ShiftValue) + .addReg(AMDIL::ALU_LITERAL_X) + .addImm(2); + BuildMI(*BB, I, BB->findDebugLoc(I), TII->get(AMDIL::LSHR_eg), NewAddr) + .addOperand(MI->getOperand(1)) + .addReg(ShiftValue); + BuildMI(*BB, I, BB->findDebugLoc(I), TII->get(MI->getOpcode())) + .addOperand(MI->getOperand(0)) + .addReg(NewAddr); + break; + } + case AMDIL::STORE_OUTPUT: { int64_t OutputIndex = MI->getOperand(1).getImm(); |