[PATCH] D106909: [clang] Add clang builtins support for gfx90a

Anshil Gandhi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 30 08:30:52 PDT 2021


gandhi21299 added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16114
+    Intrinsic::ID IID;
+    llvm::Type *ArgTy = llvm::Type::getDoubleTy(getLLVMContext());
+    switch (BuiltinID) {
----------------
arsenm wrote:
> Initializing this here is strange, sink down to the double case
You mean push it down after line 16119?


================
Comment at: clang/test/CodeGenOpenCL/builtins-fp-atomics.cl:112
+kernel void test_flat_global_max(__global double *addr, double x){
+  __builtin_amdgcn_flat_atomic_fmax_f64(addr, x, memory_order_relaxed);
+}
----------------
arsenm wrote:
> If you're going to bother testing the ISA, is it worth testing rtn and no rtn versions?
Sorry, what do you mean by rtn version?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106909/new/

https://reviews.llvm.org/D106909



More information about the cfe-commits mailing list