diff --git a/Project.toml b/Project.toml index 83cb5a05..89dde42b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "GPUCompiler" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "2.2.1" +version = "2.2.2" authors = ["Tim Besard "] [workspace] diff --git a/src/gcn.jl b/src/gcn.jl index 20b25e71..64113690 100644 --- a/src/gcn.jl +++ b/src/gcn.jl @@ -39,8 +39,13 @@ end ## job -isintrinsic(@nospecialize(job::CompilerJob{GCNCompilerTarget}), fn::String) = - return startswith(fn, "llvm.amdgcn.") +function isintrinsic(@nospecialize(job::CompilerJob{GCNCompilerTarget}), fn::String) + startswith(fn, "llvm.amdgcn.") && return true + # The ROCm device libraries use `llvm.frexp` and `llvm.ldexp`, which were only added in + # LLVM 17, so they are not recognized as intrinsics by older versions of LLVM. + # Final code generation knows how to lower them, so accept them here. + return startswith(fn, "llvm.frexp.") || startswith(fn, "llvm.ldexp.") +end pass_by_ref(@nospecialize(job::CompilerJob{GCNCompilerTarget})) = true