[llvm] Reland "[NVPTX] Add support for atomic add for f16 type" (PR #85197)

Adrian Kuegel via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 23:52:23 PDT 2024


================
@@ -1520,11 +1520,13 @@ multiclass F_ATOMIC_2_imp<ValueType ptrT, NVPTXRegClass ptrclass,
   def imm : NVPTXInst<(outs regclass:$dst), (ins ptrclass:$addr, IMMType:$b),
     !strconcat("atom", SpaceStr, OpcStr, TypeStr, " \t$dst, [$addr], $b;", ""),
     [(set (regT regclass:$dst), (IntOp (ptrT ptrclass:$addr), IMM:$b))]>,
-  Requires<Pred>;
+  Requires<!listconcat(Pred, [!if(!eq(TypeStr, ".f16"), Predicate<"false">, Predicate<"true">)])>;
----------------
akuegel wrote:

Thanks for the suggestion, this looks much nicer :)
Done.

https://github.com/llvm/llvm-project/pull/85197


More information about the llvm-commits mailing list