================
@@ -436,4 +440,32 @@ void SemaAMDGPU::handleAMDGPUMaxNumWorkGroupsAttr(Decl *D,
addAMDGPUMaxNumWorkGroupsAttr(D, AL, AL.getArgAsExpr(0), YExpr, ZExpr);
}
+
+bool SemaAMDGPU::checkAMDGCNAtomicFaddV2F16Type(CallExpr *TheCall) {
+ // Check that the pointer argument is a pointer to v2f16
+
+ Expr *Arg = TheCall->getArg(1);
+ QualType ArgType = Arg->getType();
+
+ // Check if it's a vector type
+ if (!ArgType->isVectorType()) {
+ Diag(Arg->getBeginLoc(), diag::err_typecheck_call_different_arg_types)
+ << "expected _Float16 vector of length 2" << ArgType
----------------
arsenm wrote:
Plus no diagnostic messages should be hardcoded strings like this.
You shouldn't need to do anything for the type checking. All of these builtins
are marked with "t" for custom typechecking, but I don't see why. Can you just
remove that from the builtin definition?
https://github.com/llvm/llvm-project/pull/158145
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits