[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 01:29:07 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:
This is a bit ugly, maybe you have an idea how to improve this? At least it seems to do what it should :)
https://github.com/llvm/llvm-project/pull/85197
More information about the llvm-commits
mailing list