Skip to content

Commit 526f2ec

Browse files
committed
Fix for nightly.
1 parent 7f7bdb6 commit 526f2ec

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/metal.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,12 @@ function finish_ir!(@nospecialize(job::CompilerJob{MetalCompilerTarget}), mod::L
200200
end
201201

202202
# perform codegen passes that would normally run during machine code emission
203-
# XXX: codegen passes don't seem available in the new pass manager yet
204-
@dispose pm=ModulePassManager() begin
205-
expand_reductions!(pm)
206-
run!(pm, mod)
203+
if LLVM.has_oldpm()
204+
# XXX: codegen passes don't seem available in the new pass manager yet
205+
@dispose pm=ModulePassManager() begin
206+
expand_reductions!(pm)
207+
run!(pm, mod)
208+
end
207209
end
208210

209211
return functions(mod)[entry_fn]

0 commit comments

Comments
 (0)