From: Tom Stellard Date: Thu, 17 May 2012 16:54:43 +0000 (-0400) Subject: radeon/llvm: Remove AMDIL CMOVLOG* instruction defs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91484de22dd5143cef5f2fe7786f96abfbc795c8;p=mesa.git radeon/llvm: Remove AMDIL CMOVLOG* instruction defs --- diff --git a/src/gallium/drivers/radeon/AMDGPUGenInstrEnums.pl b/src/gallium/drivers/radeon/AMDGPUGenInstrEnums.pl index ddff39912cd..a6a76271565 100644 --- a/src/gallium/drivers/radeon/AMDGPUGenInstrEnums.pl +++ b/src/gallium/drivers/radeon/AMDGPUGenInstrEnums.pl @@ -57,7 +57,7 @@ my $FILE_TYPE = $ARGV[0]; open AMDIL, '<', 'AMDILInstructions.td'; -my @INST_ENUMS = ('NONE', 'FEQ', 'FGE', 'FLT', 'FNE', 'MOVE_f32', 'MOVE_i32', 'FTOI', 'ITOF', 'CMOVLOG_f32', 'UGT', 'IGE', 'INE', 'UGE', 'IEQ', 'BINARY_OR_i32', 'BINARY_NOT_i32', 'MIN_f32'); +my @INST_ENUMS = ('NONE', 'FEQ', 'FGE', 'FLT', 'FNE', 'MOVE_f32', 'MOVE_i32', 'FTOI', 'ITOF', 'UGT', 'IGE', 'INE', 'UGE', 'IEQ', 'BINARY_OR_i32', 'BINARY_NOT_i32', 'MIN_f32'); while () { if ($_ =~ /defm\s+([A-Z_]+)\s+:\s+([A-Za-z0-9]+); defm CMOV : BinaryOpMC; defm DIV_INF : BinaryOpMC; defm SMAX : BinaryOpMCInt; -// This opcode has custom swizzle pattern encoded in Swizzle Encoder for 64bit -// instructions -defm CMOVLOG : TernaryOpMC; // This opcode has a custom swizzle pattern in the Swizzle Encoder and // should never be selected in ISel. It should only be generated in the // I/O expansion code. These are different from the CMOVLOG instruction @@ -107,8 +104,6 @@ defm CARRY : BinaryIntrinsicInt; defm BORROW : BinaryIntrinsicInt; defm IMIN : BinaryIntrinsicInt; defm IMAX : BinaryIntrinsicInt; -defm CMOV_LOG : TernaryIntrinsicInt; defm IBIT_EXTRACT : TernaryIntrinsicInt; defm IMAD : TernaryIntrinsicInt; diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td index c3643b6f967..f7fe34b7326 100644 --- a/src/gallium/drivers/radeon/R600Instructions.td +++ b/src/gallium/drivers/radeon/R600Instructions.td @@ -421,7 +421,8 @@ def SETGE_UINT : R600_2OP < def CNDE_INT : R600_3OP < 0x1C, "CNDE_INT", - [] + [(set (i32 R600_Reg32:$dst), + (IL_cmov_logical R600_Reg32:$src0, R600_Reg32:$src2, R600_Reg32:$src1))] >; /* Texture instructions */ @@ -527,9 +528,9 @@ class MULADD_Common inst> : R600_3OP < class CNDE_Common inst> : R600_3OP < inst, "CNDE", - []> { - let AMDILOp = AMDILInst.CMOVLOG_f32; -} + [(set (f32 R600_Reg32:$dst), + (IL_cmov_logical R600_Reg32:$src0, R600_Reg32:$src2, R600_Reg32:$src1))] +>; class CNDGT_Common inst> : R600_3OP < inst, "CNDGT", diff --git a/src/gallium/drivers/radeon/R600LowerInstructions.cpp b/src/gallium/drivers/radeon/R600LowerInstructions.cpp index 2edae320c29..5a0f1d9cca9 100644 --- a/src/gallium/drivers/radeon/R600LowerInstructions.cpp +++ b/src/gallium/drivers/radeon/R600LowerInstructions.cpp @@ -114,22 +114,6 @@ bool R600LowerInstructionsPass::runOnMachineFunction(MachineFunction &MF) .addReg(tmp2); break; } - case AMDIL::CMOVLOG_f32: - BuildMI(MBB, I, MBB.findDebugLoc(I), TM.getInstrInfo()->get(MI.getOpcode())) - .addOperand(MI.getOperand(0)) - .addOperand(MI.getOperand(1)) - .addOperand(MI.getOperand(3)) - .addOperand(MI.getOperand(2)); - break; - - case AMDIL::CMOVLOG_i32: - BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(AMDIL::CNDE_INT)) - .addOperand(MI.getOperand(0)) - .addOperand(MI.getOperand(1)) - .addOperand(MI.getOperand(3)) - .addOperand(MI.getOperand(2)); - break; - case AMDIL::CLAMP_f32: { MachineOperand lowOp = MI.getOperand(2);