mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
R600/SI: Update VOP3b to not include obsolete operands
abs / neg are now part of the srcN_modifiers operands git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218691 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -736,15 +736,16 @@ SDNode *AMDGPUDAGToDAGISel::SelectDIV_SCALE(SDNode *N) {
|
|||||||
= (VT == MVT::f64) ? AMDGPU::V_DIV_SCALE_F64 : AMDGPU::V_DIV_SCALE_F32;
|
= (VT == MVT::f64) ? AMDGPU::V_DIV_SCALE_F64 : AMDGPU::V_DIV_SCALE_F32;
|
||||||
|
|
||||||
const SDValue Zero = CurDAG->getTargetConstant(0, MVT::i32);
|
const SDValue Zero = CurDAG->getTargetConstant(0, MVT::i32);
|
||||||
|
const SDValue False = CurDAG->getTargetConstant(0, MVT::i1);
|
||||||
SDValue Ops[] = {
|
SDValue Ops[] = {
|
||||||
N->getOperand(0),
|
Zero, // src0_modifiers
|
||||||
N->getOperand(1),
|
N->getOperand(0), // src0
|
||||||
N->getOperand(2),
|
Zero, // src1_modifiers
|
||||||
Zero,
|
N->getOperand(1), // src1
|
||||||
Zero,
|
Zero, // src2_modifiers
|
||||||
Zero,
|
N->getOperand(2), // src2
|
||||||
Zero
|
False, // clamp
|
||||||
|
Zero // omod
|
||||||
};
|
};
|
||||||
|
|
||||||
return CurDAG->SelectNodeTo(N, Opc, VT, MVT::i1, Ops);
|
return CurDAG->SelectNodeTo(N, Opc, VT, MVT::i1, Ops);
|
||||||
|
@@ -711,8 +711,6 @@ MachineInstr *SIInstrInfo::commuteInstruction(MachineInstr *MI,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// XXX: Commute VOP3 instructions with abs and neg set .
|
// 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,
|
const MachineOperand *Src0Mods = getNamedOperand(*MI,
|
||||||
AMDGPU::OpName::src0_modifiers);
|
AMDGPU::OpName::src0_modifiers);
|
||||||
const MachineOperand *Src1Mods = getNamedOperand(*MI,
|
const MachineOperand *Src1Mods = getNamedOperand(*MI,
|
||||||
@@ -720,8 +718,8 @@ MachineInstr *SIInstrInfo::commuteInstruction(MachineInstr *MI,
|
|||||||
const MachineOperand *Src2Mods = getNamedOperand(*MI,
|
const MachineOperand *Src2Mods = getNamedOperand(*MI,
|
||||||
AMDGPU::OpName::src2_modifiers);
|
AMDGPU::OpName::src2_modifiers);
|
||||||
|
|
||||||
if ((Abs && Abs->getImm()) || (Neg && Neg->getImm()) ||
|
if ((Src0Mods && Src0Mods->getImm()) ||
|
||||||
(Src0Mods && Src0Mods->getImm()) || (Src1Mods && Src1Mods->getImm()) ||
|
(Src1Mods && Src1Mods->getImm()) ||
|
||||||
(Src2Mods && Src2Mods->getImm()))
|
(Src2Mods && Src2Mods->getImm()))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@@ -792,9 +792,11 @@ multiclass VOP3b_Helper <bits<9> op, RegisterClass vrc, RegisterClass arc,
|
|||||||
string opName, list<dag> pattern> :
|
string opName, list<dag> pattern> :
|
||||||
VOP3b_2_m <
|
VOP3b_2_m <
|
||||||
op, (outs vrc:$dst0, SReg_64:$dst1),
|
op, (outs vrc:$dst0, SReg_64:$dst1),
|
||||||
(ins arc:$src0, arc:$src1, arc:$src2,
|
(ins InputModsNoDefault:$src0_modifiers, arc:$src0,
|
||||||
InstFlag:$abs, InstFlag:$clamp, InstFlag:$omod, InstFlag:$neg),
|
InputModsNoDefault:$src1_modifiers, arc:$src1,
|
||||||
opName#" $dst0, $dst1, $src0, $src1, $src2, $abs, $clamp, $omod, $neg", pattern,
|
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
|
opName, opName, 1, 1
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user