diff --git a/src/LLVM_intrinsics.jl b/src/LLVM_intrinsics.jl index 3ffa1e7..3c9ecd5 100644 --- a/src/LLVM_intrinsics.jl +++ b/src/LLVM_intrinsics.jl @@ -224,7 +224,7 @@ for f in BINARY_OPS_FLOAT end for f in BINARY_OPS_INT - @eval @generated function $f(x::T, y::T) where T<:LT{<:IntegerTypes} + @eval @generated function $f(x::T, y::T, ::F=nothing) where {T<:LT{<:IntegerTypes}, F<:FPFlags} ff = $(QuoteNode(f)) s = """ %3 = $ff $(llvm_type(T)) %0, %1 diff --git a/test/runtests.jl b/test/runtests.jl index 59c7b43..0dc6807 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -442,6 +442,9 @@ llvm_ir(f, args) = sprint(code_llvm, f, Base.typesof(args...)) 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]*,