diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp index 39b4200..fb83388 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp @@ -3449,63 +3449,6 @@ bool AMDGPUDAGToDAGISel::SelectVOP3PModsDOT(SDValue In, SDValue &Src, return SelectVOP3PMods(In, Src, SrcMods, true); } -// Select neg_lo from the i1 immediate operand. -bool AMDGPUDAGToDAGISel::SelectVOP3PModsNeg(SDValue In, SDValue &Src) const { - const ConstantSDNode *C = cast<ConstantSDNode>(In); - // Literal i1 value set in intrinsic, represents SrcMods for the next operand. - // 1 promotes packed values to signed, 0 treats them as unsigned. - assert(C->getAPIntValue().getBitWidth() == 1 && "expected i1 value"); - - unsigned Mods = SISrcMods::OP_SEL_1; - unsigned SrcSign = C->getZExtValue(); - if (SrcSign == 1) - Mods ^= SISrcMods::NEG; - - Src = CurDAG->getTargetConstant(Mods, SDLoc(In), MVT::i32); - return true; -} - -// Select both neg_lo and neg_hi from the i1 immediate operand. This is -// specifically for F16/BF16 operands in WMMA instructions, where neg_lo applies -// to matrix's even k elements, and neg_hi applies to matrix's odd k elements. -bool AMDGPUDAGToDAGISel::SelectVOP3PModsNegs(SDValue In, SDValue &Src) const { - const ConstantSDNode *C = cast<ConstantSDNode>(In); - // Literal i1 value set in intrinsic, represents SrcMods for the next operand. - // 1 promotes packed values to signed, 0 treats them as unsigned. - assert(C->getAPIntValue().getBitWidth() == 1 && "expected i1 value"); - - unsigned Mods = SISrcMods::OP_SEL_1; - unsigned SrcSign = C->getZExtValue(); - if (SrcSign == 1) - Mods ^= (SISrcMods::NEG | SISrcMods::NEG_HI); - - Src = CurDAG->getTargetConstant(Mods, SDLoc(In), MVT::i32); - return true; -} - -// Select neg, abs, or both neg and abs from the i16 immediate operans. -bool AMDGPUDAGToDAGISel::SelectVOP3PModsNegAbs(SDValue In, SDValue &Src) const { - const ConstantSDNode *C = cast<ConstantSDNode>(In); - unsigned Mods = SISrcMods::OP_SEL_1; - unsigned SrcMod = C->getZExtValue(); - switch (SrcMod) { - default: // Any other value will be silently ignored (considered as 0). - break; - case 1: - Mods ^= SISrcMods::NEG; - break; - case 2: - Mods ^= SISrcMods::ABS; - break; - case 3: - Mods ^= (SISrcMods::NEG | SISrcMods::ABS); - break; - } - - Src = CurDAG->getTargetConstant(Mods, SDLoc(In), MVT::i32); - return true; -} - bool AMDGPUDAGToDAGISel::SelectWMMAOpSelVOP3PMods(SDValue In, SDValue &Src) const { const ConstantSDNode *C = cast<ConstantSDNode>(In); |