summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/SIInstrInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeon/SIInstrInfo.cpp')
-rw-r--r--src/gallium/drivers/radeon/SIInstrInfo.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/gallium/drivers/radeon/SIInstrInfo.cpp b/src/gallium/drivers/radeon/SIInstrInfo.cpp
index df2cd9bb023..4ee3e5d5f8d 100644
--- a/src/gallium/drivers/radeon/SIInstrInfo.cpp
+++ b/src/gallium/drivers/radeon/SIInstrInfo.cpp
@@ -80,12 +80,6 @@ unsigned SIInstrInfo::getEncodingBytes(const MachineInstr &MI) const
MachineInstr * SIInstrInfo::convertToISA(MachineInstr & MI, MachineFunction &MF,
DebugLoc DL) const
{
-
- switch (MI.getOpcode()) {
- default: break;
- case AMDIL::CLAMP_f32: return convertCLAMP_f32(MI, MF, DL);
- }
-
MachineInstr * newMI = AMDGPUInstrInfo::convertToISA(MI, MF, DL);
const MCInstrDesc &newDesc = get(newMI->getOpcode());
@@ -111,40 +105,3 @@ unsigned SIInstrInfo::getISAOpcode(unsigned AMDILopcode) const
default: return AMDILopcode;
}
}
-
-MachineInstr * SIInstrInfo::convertCLAMP_f32(MachineInstr & clampInstr,
- MachineFunction &MF, DebugLoc DL) const
-{
- MachineRegisterInfo &MRI = MF.getRegInfo();
- /* XXX: HACK assume that low == zero and high == one for now until
- * we have a way to propogate the immediates. */
-
-/*
- uint32_t zero = (uint32_t)APFloat(0.0f).bitcastToAPInt().getZExtValue();
- uint32_t one = (uint32_t)APFloat(1.0f).bitcastToAPInt().getZExtValue();
- uint32_t low = clampInstr.getOperand(2).getImm();
- uint32_t high = clampInstr.getOperand(3).getImm();
-*/
-// if (low == zero && high == one) {
-
- /* Convert the desination register to the VReg_32 class */
- if (TargetRegisterInfo::isVirtualRegister(clampInstr.getOperand(0).getReg())) {
- MRI.setRegClass(clampInstr.getOperand(0).getReg(),
- AMDIL::VReg_32RegisterClass);
- }
- return BuildMI(MF, DL, get(AMDIL::V_MOV_B32_e64))
- .addOperand(clampInstr.getOperand(0))
- .addOperand(clampInstr.getOperand(1))
- /* VSRC1-2 are unused, but we still need to fill all the
- * operand slots, so we just reuse the VSRC0 operand */
- .addOperand(clampInstr.getOperand(1))
- .addOperand(clampInstr.getOperand(1))
- .addImm(0) // ABS
- .addImm(1) // CLAMP
- .addImm(0) // OMOD
- .addImm(0); // NEG
-// } else {
- /* XXX: Handle other cases */
-// abort();
-// }
-}