Skip to content

Commit

Permalink
Update fmul optimization test
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed May 1, 2024
1 parent 053e54f commit 3907459
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ llvm_ir(f, args) = sprint(code_llvm, f, Base.typesof(args...))
@test all(Tuple(@fastmath -v) .≈ Tuple(-v))
f = v -> @fastmath v + v
# Test that v+v is rewritten as v * 2.0 (change test if optimization changes)
@test occursin(r"fmul fast <4 x double> %[0-9]*, <double 2\.000000e\+00", llvm_ir(f, (v,)))
@test occursin(r"fmul fast <4 x double> %[^%,]*, <double 2\.000000e\+00", llvm_ir(f, (v,)))

a = Vec{8, Int32}(0)
@test all((@fastmath a + a) == a)
Expand Down

0 comments on commit 3907459

Please sign in to comment.