Skip to content

Commit b1d498b

Browse files
authored
LowerSIMDLoopPass is a Loop Pass in 1.10 (#398)
1 parent 9adb397 commit b1d498b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/interop/newpm.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import ..LLVM: pass_string, options_string, add!
44

55
@module_pass "CPUFeatures" CPUFeaturesPass
66
@module_pass "RemoveNI" RemoveNIPass
7-
@module_pass "LowerSIMDLoop" LowerSIMDLoopPass
7+
@static if VERSION < v"1.10.0-beta3.44"
8+
@module_pass "LowerSIMDLoop" LowerSIMDLoopPass
9+
end
810
@module_pass "RemoveJuliaAddrspaces" RemoveJuliaAddrspacesPass
911
@module_pass "RemoveAddrspaces" RemoveAddrspacesPass
1012
@static if VERSION < v"1.11.0-DEV.208"
@@ -44,6 +46,9 @@ options_string(options::GCInvariantVerifierPassOptions) = options.strong ? "<str
4446
@function_pass "GCInvariantVerifier" GCInvariantVerifierPass GCInvariantVerifierPassOptions
4547

4648
@loop_pass "JuliaLICM" JuliaLICMPass
49+
@static if VERSION >= v"1.10.0-beta3.44"
50+
@loop_pass "LowerSIMDLoop" LowerSIMDLoopPass
51+
end
4752

4853
# The entire Julia pipeline
4954
struct JuliaPipelinePassOptions

test/newpm_tests.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,14 @@ host_t = Target(triple=host_triple)
527527
add!(fpm, EarlyCSEPass())
528528
add!(fpm, AllocOptPass())
529529
end
530-
add!(mpm, LowerSIMDLoopPass())
530+
@static if VERSION < v"1.10.0-beta3.44"
531+
add!(mpm, LowerSIMDLoopPass())
532+
end
531533
add!(mpm, NewPMFunctionPassManager) do fpm
532534
add!(fpm, NewPMLoopPassManager) do lpm
535+
@static if VERSION >= v"1.10.0-beta3.44"
536+
add!(lpm, LowerSIMDLoopPass())
537+
end
533538
add!(lpm, LoopRotatePass())
534539
end
535540
add!(fpm, NewPMLoopPassManager, #=UseMemorySSA=#true) do lpm

0 commit comments

Comments
 (0)