mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 00:10:10 +01:00
radeon/llvm: Add support for fneg on SI
This commit is contained in:
parent
4104bae063
commit
a35eea7868
2 changed files with 16 additions and 0 deletions
|
|
@ -99,6 +99,21 @@ MachineBasicBlock * SITargetLowering::EmitInstrWithCustomInserter(
|
|||
MI->eraseFromParent();
|
||||
break;
|
||||
|
||||
case AMDGPU::FNEG_SI:
|
||||
BuildMI(*BB, I, BB->findDebugLoc(I), TII->get(AMDGPU::V_MOV_B32_e64))
|
||||
.addOperand(MI->getOperand(0))
|
||||
.addOperand(MI->getOperand(1))
|
||||
// VSRC1-2 are unused, but we still need to fill all the
|
||||
// operand slots, so we just reuse the VSRC0 operand
|
||||
.addOperand(MI->getOperand(1))
|
||||
.addOperand(MI->getOperand(1))
|
||||
.addImm(0) // ABS
|
||||
.addImm(0) // CLAMP
|
||||
.addImm(0) // OMOD
|
||||
.addImm(1); // NEG
|
||||
MI->eraseFromParent();
|
||||
break;
|
||||
|
||||
case AMDGPU::SI_INTERP:
|
||||
LowerSI_INTERP(MI, *BB, I, MRI);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1017,6 +1017,7 @@ def : Pat <
|
|||
|
||||
def CLAMP_SI : CLAMP<VReg_32>;
|
||||
def FABS_SI : FABS<VReg_32>;
|
||||
def FNEG_SI : FNEG<VReg_32>;
|
||||
|
||||
def : Extract_Element <f32, v4f32, VReg_128, 0, sel_x>;
|
||||
def : Extract_Element <f32, v4f32, VReg_128, 1, sel_y>;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue