@@ -1630,6 +1630,13 @@ defm INT_PTX_ATOM_ADD_GEN_64 : F_ATOMIC_2<i64, Int64Regs, "", ".u64", ".add",
16301630defm INT_PTX_ATOM_ADD_GEN_64_USE_G : F_ATOMIC_2<i64, Int64Regs, ".global", ".u64",
16311631 ".add", atomic_load_add_64_gen, i64imm, imm>;
16321632
1633+ defm INT_PTX_ATOM_ADD_G_F16 : F_ATOMIC_2<f16, Int16Regs, ".global", ".f16", ".add.noftz",
1634+ atomic_load_add_g, f16imm, fpimm, [hasSM<70>, hasPTX<63>]>;
1635+ defm INT_PTX_ATOM_ADD_S_F16 : F_ATOMIC_2<f16, Int16Regs, ".shared", ".f16", ".add.noftz",
1636+ atomic_load_add_s, f16imm, fpimm, [hasSM<70>, hasPTX<63>]>;
1637+ defm INT_PTX_ATOM_ADD_GEN_F16 : F_ATOMIC_2<f16, Int16Regs, "", ".f16", ".add.noftz",
1638+ atomic_load_add_gen, f16imm, fpimm, [hasSM<70>, hasPTX<63>]>;
1639+
16331640defm INT_PTX_ATOM_ADD_G_F32 : F_ATOMIC_2<f32, Float32Regs, ".global", ".f32", ".add",
16341641 atomic_load_add_g, f32imm, fpimm>;
16351642defm INT_PTX_ATOM_ADD_S_F32 : F_ATOMIC_2<f32, Float32Regs, ".shared", ".f32", ".add",
@@ -2007,6 +2014,9 @@ multiclass ATOM2P_impl<string AsmStr, Intrinsic Intr,
20072014 SDNode Imm, ValueType ImmTy,
20082015 list<Predicate> Preds> {
20092016 let AddedComplexity = 1 in {
2017+ def : ATOM23_impl<AsmStr, regT, regclass, Preds,
2018+ (ins Int16Regs:$src, regclass:$b),
2019+ (Intr (i16 Int16Regs:$src), (regT regclass:$b))>;
20102020 def : ATOM23_impl<AsmStr, regT, regclass, Preds,
20112021 (ins Int32Regs:$src, regclass:$b),
20122022 (Intr (i32 Int32Regs:$src), (regT regclass:$b))>;
@@ -2017,6 +2027,9 @@ multiclass ATOM2P_impl<string AsmStr, Intrinsic Intr,
20172027 // tablegen can't infer argument types from Intrinsic (though it can
20182028 // from Instruction) so we have to enforce specific type on
20192029 // immediates via explicit cast to ImmTy.
2030+ def : ATOM23_impl<AsmStr, regT, regclass, Preds,
2031+ (ins Int16Regs:$src, ImmType:$b),
2032+ (Intr (i16 Int16Regs:$src), (ImmTy Imm:$b))>;
20202033 def : ATOM23_impl<AsmStr, regT, regclass, Preds,
20212034 (ins Int32Regs:$src, ImmType:$b),
20222035 (Intr (i32 Int32Regs:$src), (ImmTy Imm:$b))>;
@@ -2136,6 +2149,8 @@ multiclass ATOM2_add_impl<string OpStr> {
21362149 defm _s32 : ATOM2S_impl<OpStr, "i", "s32", i32, Int32Regs, i32imm, imm, i32, []>;
21372150 defm _u32 : ATOM2S_impl<OpStr, "i", "u32", i32, Int32Regs, i32imm, imm, i32, []>;
21382151 defm _u64 : ATOM2S_impl<OpStr, "i", "u64", i64, Int64Regs, i64imm, imm, i64, []>;
2152+ defm _f16 : ATOM2S_impl<OpStr, "f", "f16", f16, Int16Regs, f16imm, fpimm, f16,
2153+ [hasSM<70>, hasPTX<63>]>;
21392154 defm _f32 : ATOM2S_impl<OpStr, "f", "f32", f32, Float32Regs, f32imm, fpimm, f32,
21402155 []>;
21412156 defm _f64 : ATOM2S_impl<OpStr, "f", "f64", f64, Float64Regs, f64imm, fpimm, f64,
0 commit comments