Skip to content

Commit

Permalink
add a warning and two explicit inlines
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Feb 13, 2020
1 parent 9e00a1c commit 8041e0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/LLVM_intrinsics.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# LLVM operations and intrinsics
module Intrinsics

# Note that in the functions below, some care needs to be taken when passing
# Julia Bools to LLVM. Julia passes Bools as LLVM i8 but expect them to only
# have the last bit as non-zero. Failure to comply with this can give weird errors
# like false !== false where the first false is the result of some computation.

# TODO: fastmath flags

import ..SIMD: SIMD, VE, LVec, FloatingTypes
Expand Down Expand Up @@ -552,6 +557,7 @@ for (fs, c) in zip([HORZ_REDUCTION_OPS_FLOAT, HORZ_REDUCTION_OPS_INT],
ret $(d[T]) %res
"""
return quote
$(Expr(:meta, :inline));
Base.llvmcall($(decl, s2), T, Tuple{LVec{N, T},}, x)
end
end
Expand All @@ -570,6 +576,7 @@ for (f, neutral) in [(:fadd, "0.0"), (:fmul, "1.0")]
ret $(d[T]) %res
"""
return quote
$(Expr(:meta, :inline));
Base.llvmcall($(decl, s2), T, Tuple{LVec{N, T},}, x)
end
end
Expand Down

0 comments on commit 8041e0a

Please sign in to comment.