Skip to content

Commit 56b0c28

Browse files
authored
fix erase! call in src/gcn.jl (#706)
1 parent a063141 commit 56b0c28

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "GPUCompiler"
22
uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
3-
version = "1.6.0"
3+
version = "1.6.1"
44
authors = ["Tim Besard <[email protected]>"]
55

66
[deps]

src/gcn.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function lower_throw_extra!(mod::LLVM.Module)
8787
# remove the call
8888
nargs = length(parameters(f))
8989
call_args = arguments(call)
90-
erase!(LLVM.parent(call), call)
90+
erase!(call)
9191

9292
# HACK: kill the exceptions' unused arguments
9393
for arg in call_args

test/gcn.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@ sink_gcn(i) = sink(i, Val(5))
2121
end
2222
end
2323

24+
@testset "bounds errors" begin
25+
mod = @eval module $(gensym())
26+
function kernel()
27+
Base.throw_boundserror(1, 2)
28+
return
29+
end
30+
end
31+
32+
@test @filecheck begin
33+
check"CHECK-NOT: {{julia_throw_boundserror_[0-9]+}}"
34+
check"CHECK: @gpu_report_exception"
35+
check"CHECK: @gpu_signal_exception"
36+
GCN.code_llvm(mod.kernel, Tuple{})
37+
end
38+
end
39+
2440
end
2541

2642
############################################################################################

0 commit comments

Comments
 (0)