1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

R600/SI: Update VOP3b to not include obsolete operands

abs / neg are now part of the srcN_modifiers operands

llvm-svn: 218691
This commit is contained in:
Matt Arsenault 2014-09-30 19:49:43 +00:00
parent 4388d0e70f
commit ace0d8c9eb
3 changed files with 16 additions and 15 deletions

View File

@ -736,15 +736,16 @@ SDNode *AMDGPUDAGToDAGISel::SelectDIV_SCALE(SDNode *N) {
= (VT == MVT::f64) ? AMDGPU::V_DIV_SCALE_F64 : AMDGPU::V_DIV_SCALE_F32;
const SDValue Zero = CurDAG->getTargetConstant(0, MVT::i32);
const SDValue False = CurDAG->getTargetConstant(0, MVT::i1);
SDValue Ops[] = {
N->getOperand(0),
N->getOperand(1),
N->getOperand(2),
Zero,
Zero,
Zero,
Zero
Zero, // src0_modifiers
N->getOperand(0), // src0
Zero, // src1_modifiers
N->getOperand(1), // src1
Zero, // src2_modifiers
N->getOperand(2), // src2
False, // clamp
Zero // omod
};
return CurDAG->SelectNodeTo(N, Opc, VT, MVT::i1, Ops);

View File

@ -711,8 +711,6 @@ MachineInstr *SIInstrInfo::commuteInstruction(MachineInstr *MI,
}
// XXX: Commute VOP3 instructions with abs and neg set .
const MachineOperand *Abs = getNamedOperand(*MI, AMDGPU::OpName::abs);
const MachineOperand *Neg = getNamedOperand(*MI, AMDGPU::OpName::neg);
const MachineOperand *Src0Mods = getNamedOperand(*MI,
AMDGPU::OpName::src0_modifiers);
const MachineOperand *Src1Mods = getNamedOperand(*MI,
@ -720,8 +718,8 @@ MachineInstr *SIInstrInfo::commuteInstruction(MachineInstr *MI,
const MachineOperand *Src2Mods = getNamedOperand(*MI,
AMDGPU::OpName::src2_modifiers);
if ((Abs && Abs->getImm()) || (Neg && Neg->getImm()) ||
(Src0Mods && Src0Mods->getImm()) || (Src1Mods && Src1Mods->getImm()) ||
if ((Src0Mods && Src0Mods->getImm()) ||
(Src1Mods && Src1Mods->getImm()) ||
(Src2Mods && Src2Mods->getImm()))
return nullptr;

View File

@ -792,9 +792,11 @@ multiclass VOP3b_Helper <bits<9> op, RegisterClass vrc, RegisterClass arc,
string opName, list<dag> pattern> :
VOP3b_2_m <
op, (outs vrc:$dst0, SReg_64:$dst1),
(ins arc:$src0, arc:$src1, arc:$src2,
InstFlag:$abs, InstFlag:$clamp, InstFlag:$omod, InstFlag:$neg),
opName#" $dst0, $dst1, $src0, $src1, $src2, $abs, $clamp, $omod, $neg", pattern,
(ins InputModsNoDefault:$src0_modifiers, arc:$src0,
InputModsNoDefault:$src1_modifiers, arc:$src1,
InputModsNoDefault:$src2_modifiers, arc:$src2,
i32imm:$clamp, i32imm:$omod),
opName#" $dst0, $dst1, $src0_modifiers, $src1_modifiers, $src2_modifiers, $clamp, $omod", pattern,
opName, opName, 1, 1
>;