Skip to content

Commit ba0bf0f

Browse files
committed
fix ldg test thanks to vchuravy.
1 parent dc99a48 commit ba0bf0f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/core/device/ldg.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
@testset "ldg" begin
2-
ir = sprint(io->CUDA.code_llvm(io, CUDA.pointerref_ldg, Tuple{Core.LLVMPtr{Int,AS.Global},Int,Val{1}}; raw=true))
2+
# NOTE: This is necessary because it seems that code_llvm has a bug which causes it to ignore
3+
# the method table. Wrapping it in a function gets us what we want currently but the PR
4+
# here: https://github.com/JuliaLang/julia/pull/60718 will likely fix this according to
5+
# @vchuravy. It is currently not backported.
6+
ir = sprint(io->CUDA.code_llvm(io, (args...)->CUDA.pointerref_ldg(args...), Tuple{Core.LLVMPtr{Int,AS.Global},Int,Val{1}}; raw=true))
37
if Base.libllvm_version >= v"20"
48
# `@llvm.nvvm.ldg` was removed in LLVM 20; the auto-upgrade
59
# replaces it with a load bearing `!invariant.load` metadata

0 commit comments

Comments
 (0)