summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/R600LowerInstructions.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-05-25 10:50:35 -0400
committerTom Stellard <[email protected]>2012-05-25 15:40:58 -0400
commitd784bc77405012b442ae9d68f200e9d115030b3c (patch)
tree7d8b857f99d40f7e26e7f597385c53a6f7c227ee /src/gallium/drivers/radeon/R600LowerInstructions.cpp
parent17f852892346fdf3b1e9eec56b7a55c470279bc8 (diff)
radeon/llvm: Use a custom inserter to lower CLAMP
Diffstat (limited to 'src/gallium/drivers/radeon/R600LowerInstructions.cpp')
-rw-r--r--src/gallium/drivers/radeon/R600LowerInstructions.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/gallium/drivers/radeon/R600LowerInstructions.cpp b/src/gallium/drivers/radeon/R600LowerInstructions.cpp
index 3a1a12e635f..1795b38dfb6 100644
--- a/src/gallium/drivers/radeon/R600LowerInstructions.cpp
+++ b/src/gallium/drivers/radeon/R600LowerInstructions.cpp
@@ -83,23 +83,6 @@ bool R600LowerInstructionsPass::runOnMachineFunction(MachineFunction &MF)
.addOperand(MI.getOperand(1));
break;
- case AMDIL::CLAMP_f32:
- {
- MachineOperand lowOp = MI.getOperand(2);
- MachineOperand highOp = MI.getOperand(3);
- if (lowOp.isReg() && highOp.isReg()
- && lowOp.getReg() == AMDIL::ZERO && highOp.getReg() == AMDIL::ONE) {
- MI.getOperand(0).addTargetFlag(MO_FLAG_CLAMP);
- BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(AMDIL::MOV))
- .addOperand(MI.getOperand(0))
- .addOperand(MI.getOperand(1));
- } else {
- /* XXX: Handle other cases */
- abort();
- }
- break;
- }
-
/* XXX: Figure out the semantics of DIV_INF_f32 and make sure this is OK */
/* case AMDIL::DIV_INF_f32:
{
@@ -218,16 +201,6 @@ bool R600LowerInstructionsPass::runOnMachineFunction(MachineFunction &MF)
}
if (canInline) {
- MachineOperand * use = dstOp.getNextOperandForReg();
- /* The lowering operation for CLAMP needs to have the immediates
- * as operands, so we must propagate them. */
- while (use) {
- MachineOperand * next = use->getNextOperandForReg();
- if (use->getParent()->getOpcode() == AMDIL::CLAMP_f32) {
- use->setReg(inlineReg);
- }
- use = next;
- }
BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(AMDIL::COPY))
.addOperand(dstOp)
.addReg(inlineReg);