JonChesterfield added a comment. Weird pre-existing stuff in cuda_complex_builtins. It has an #ifdef AMDGCN macro in it, despite 'cuda' in the name. I note there is no corresponding 'hip' complex builtins.
The ifdef logic for stubbing out some functions (which is done with macros...) isn't ideal, it's: #if !defined (_OPENMP_NVPTX) // use std:: functions from cmath.h, which isn't included, though math.h is included from openmp before it #else #ifdef __AMDGCN__ // use ocml functions #else // use nv functions #end #end None of this uses `#define __CUDA__` so we could drop that from the openmp wrapper. Or, as far as I can tell, we could drop all the macro obfuscation in that header and just call the libm functions directly, which will already resolve to the appropriate platform specific thing. Instead of revising that as part of this patch, how about we wrap the openmp_wrappers/complex.h logic in `#ifndef __AMDGCN__`, which will cut it from the graph for openmp while leaving nvptx openmp untouched? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104904/new/ https://reviews.llvm.org/D104904 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits