Skip to content

Commit

Permalink
Print LLVM IR via at-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Dec 10, 2019
1 parent 146fff8 commit 93ecc2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/__test_ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ twice(x) = 2x
@test mapbb(twice, [1:3;], Val(false)) == [2, 4, 6]

ir_noinbounds = llvm_ir(mapbb, (twice, Float64[], Val(false)))
@debug "LLVM IR" ir_noinbounds=Text(ir_noinbounds)
if Base.JLOptions().check_bounds == 2 # --check-bounds=no
@test nmatches(r"fmul <4 x double>", ir_noinbounds) >= 4
else
@test nmatches(r"fmul <4 x double>", ir_noinbounds) == 0
end
ir_inbounds = llvm_ir(mapbb, (twice, Float64[], Val(true)))
@debug "LLVM IR" ir_inbounds=Text(ir_noinbounds)
@test nmatches(r"fmul <4 x double>", ir_inbounds) >= 4
end

0 comments on commit 93ecc2e

Please sign in to comment.