Skip to content

Commit fb9979a

Browse files
frasercrmckjsji
authored andcommitted
[NVPTX] Restore custom additions to atomic intrinsics
We have supplied additional versions of atomic intrinsics, to extend the range of data types, for example. Some syntax modifications have also been made. These modifications were dropped during the WW16 pulldown. Not all of these look strictly necessary but until there's time for a proper investigation, all have been restored.
1 parent e02b544 commit fb9979a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

llvm/lib/Target/NVPTX/NVPTXIntrinsics.td

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2250,14 +2250,16 @@ multiclass ATOM2_bitwise_impl<string OpStr> {
22502250
multiclass ATOM2_exch_impl<string OpStr> {
22512251
defm _b32 : ATOM2S_impl<OpStr, "i", "b32", I32RT, []>;
22522252
defm _b64 : ATOM2S_impl<OpStr, "i", "b64", I64RT, []>;
2253+
defm _f32 : ATOM2S_impl<OpStr, "f", "b32", F32RT, []>;
2254+
defm _f64 : ATOM2S_impl<OpStr, "f", "b64", F64RT, []>;
22532255
}
22542256

22552257
// atom.{min,max}
22562258
multiclass ATOM2_minmax_impl<string OpStr> {
22572259
defm _s32 : ATOM2S_impl<OpStr, "i", "s32", I32RT, []>;
2258-
defm _u32 : ATOM2S_impl<OpStr, "i", "u32", I32RT, []>;
2260+
defm _u32 : ATOM2S_impl<OpStr, "ui", "u32", I32RT, []>;
22592261
defm _s64 : ATOM2S_impl<OpStr, "i", "s64", I64RT, [hasAtomMinMax64]>;
2260-
defm _u64 : ATOM2S_impl<OpStr, "i", "u64", I64RT, [hasAtomMinMax64]>;
2262+
defm _u64 : ATOM2S_impl<OpStr, "ui", "u64", I64RT, [hasAtomMinMax64]>;
22612263
}
22622264

22632265
// atom.{inc,dec}
@@ -2271,6 +2273,8 @@ multiclass ATOM3_cas_impl<string OpStr> {
22712273
defm _b16 : ATOM3S_impl<OpStr, "i", "b16", I16RT, []>;
22722274
defm _b32 : ATOM3S_impl<OpStr, "i", "b32", I32RT, []>;
22732275
defm _b64 : ATOM3S_impl<OpStr, "i", "b64", I64RT, []>;
2276+
defm _f32 : ATOM3S_impl<OpStr, "f", "b32", F32RT, []>;
2277+
defm _f64 : ATOM3S_impl<OpStr, "f", "b64", F64RT, []>;
22742278
}
22752279

22762280
defm INT_PTX_SATOM_ADD : ATOM2_add_impl<"add">;

0 commit comments

Comments
 (0)