From: Wei Ding Date: Thu, 16 Jun 2016 16:50:04 +0000 (+0000) Subject: AMDGPU: Add v_mad 16-bit instructions definition. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4edb79d2d975816fee53b814703812b2287ed455;p=llvm AMDGPU: Add v_mad 16-bit instructions definition. Differential Revision: http://reviews.llvm.org/D21362 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272919 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AMDGPU/SIInstrInfo.td b/lib/Target/AMDGPU/SIInstrInfo.td index f0040ce3866..1802a905d80 100644 --- a/lib/Target/AMDGPU/SIInstrInfo.td +++ b/lib/Target/AMDGPU/SIInstrInfo.td @@ -1447,6 +1447,9 @@ def VOP_F16_F16_F16 : VOPProfile <[f16, f16, f16, untyped]>; def VOP_F16_F16_I16 : VOPProfile <[f16, f16, i32, untyped]>; def VOP_I16_I16_I16 : VOPProfile <[i32, i32, i32, untyped]>; +def VOP_I16_I16_I16_I16 : VOPProfile <[i32, i32, i32, i32, untyped]>; +def VOP_F16_F16_F16_F16 : VOPProfile <[f16, f16, f16, f16, untyped]>; + def VOP_NONE : VOPProfile <[untyped, untyped, untyped, untyped]>; def VOP_F32_F32 : VOPProfile <[f32, f32, untyped, untyped]>; diff --git a/lib/Target/AMDGPU/VIInstructions.td b/lib/Target/AMDGPU/VIInstructions.td index fcaa00d6f73..5c490ab900f 100644 --- a/lib/Target/AMDGPU/VIInstructions.td +++ b/lib/Target/AMDGPU/VIInstructions.td @@ -75,6 +75,14 @@ defm V_MIN_I16 : VOP2Inst , "v_min_i16", VOP_I16_I16_I16>; } // End isCommutable = 1 defm V_LDEXP_F16 : VOP2Inst , "v_ldexp_f16", VOP_F16_F16_I16>; +//===----------------------------------------------------------------------===// +// VOP3 Instructions +//===----------------------------------------------------------------------===// +let isCommutable = 1 in { + defm V_MAD_F16 : VOP3Inst , "v_mad_f16", VOP_F16_F16_F16_F16>; + defm V_MAD_U16 : VOP3Inst , "v_mad_u16", VOP_I16_I16_I16_I16>; + defm V_MAD_I16 : VOP3Inst , "v_mad_i16", VOP_I16_I16_I16_I16>; +} } // let DisableSIDecoder = 1 // Aliases to simplify matching of floating-point instructions that