Skip to content

Commit

Permalink
Remove fastmath tests that are defined to be undef/poison
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Dec 14, 2020
1 parent 6ddc7f1 commit d526f27
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/fastmath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ fm_fast_64_upd(x) = @fastmath (r=x; r+=eps64_2; r+=eps64_2)
@test @fastmath(cmp(two,two)) == cmp(two,two)
@test @fastmath(cmp(two,three)) == cmp(two,three)
@test @fastmath(cmp(three,two)) == cmp(three,two)
@test @fastmath(one/zero) == convert(T,Inf)
@test @fastmath(-one/zero) == -convert(T,Inf)
@test isnan(@fastmath(zero/zero)) # must not throw
# The following operations may yield `undef` (LLVM 11)
# or `poison` (LLVM 12+)
# @fastmath(one/zero)
# @fastmath(-one/zero)
# @fastmath(zero/zero)

for x in (zero, two, convert(T, Inf), convert(T, NaN))
@test @fastmath(isfinite(x))
Expand Down

0 comments on commit d526f27

Please sign in to comment.