diff options
author | Tom Stellard <[email protected]> | 2012-06-06 11:40:34 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-06-06 20:51:00 -0400 |
commit | 0c9f5f22d5cf3cad01ee3685116011ff7ff67140 (patch) | |
tree | 83c6b357556ad0d029f6822a5ae1f4460a95f6ee /src/gallium | |
parent | 9c46cb23685d0b28d5b9124f6dd26f27d028ed30 (diff) |
radeon/llvm: Remove some duplicate code in the R600 CodeEmitter
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeon/R600CodeEmitter.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeon/R600CodeEmitter.cpp b/src/gallium/drivers/radeon/R600CodeEmitter.cpp index 42d79188289..3b7ca2c2398 100644 --- a/src/gallium/drivers/radeon/R600CodeEmitter.cpp +++ b/src/gallium/drivers/radeon/R600CodeEmitter.cpp @@ -162,6 +162,7 @@ bool R600CodeEmitter::runOnMachineFunction(MachineFunction &MF) { MachineInstr &MI = *I; isReduction = AMDGPU::isReductionOp(MI.getOpcode()); isVector = TII->isVector(MI); + isCube = AMDGPU::isCubeOp(MI.getOpcode()); if (MI.getNumOperands() > 1 && MI.getOperand(0).isReg() && MI.getOperand(0).isDead()) { continue; } @@ -169,7 +170,7 @@ bool R600CodeEmitter::runOnMachineFunction(MachineFunction &MF) { emitTexInstr(MI); } else if (AMDGPU::isFCOp(MI.getOpcode())){ emitFCInstr(MI); - } else if (isReduction || isVector) { + } else if (isReduction || isVector || isCube) { isLast = false; for (currentElement = 0; currentElement < 4; currentElement++) { isLast = (currentElement == 3); @@ -177,14 +178,7 @@ bool R600CodeEmitter::runOnMachineFunction(MachineFunction &MF) { } isReduction = false; isVector = false; - } else if (AMDGPU::isCubeOp(MI.getOpcode())) { - isCube = true; - isLast = false; - for (currentElement = 0; currentElement < 4; currentElement++) { - isLast = (currentElement == 3); - emitALUInstr(MI); - } - isCube = false; + isCube = false; } else if (MI.getOpcode() == AMDIL::RETURN || MI.getOpcode() == AMDIL::BUNDLE || MI.getOpcode() == AMDIL::KILL) { |