Skip to content

Commit

Permalink
Use LLVM's FNeg to get a compliant neg_float for all Float types.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Oct 14, 2020
1 parent 2bc5b32 commit 8f285bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,8 +1038,7 @@ static Value *emit_untyped_intrinsic(jl_codectx_t &ctx, intrinsic f, Value **arg

}

// Implements IEEE negate. See issue #7868
case neg_float: return math_builder(ctx)().CreateFSub(ConstantFP::get(t, -0.0), x);
case neg_float: return math_builder(ctx)().CreateFNeg(x);
case neg_float_fast: return math_builder(ctx, true)().CreateFNeg(x);
case add_float: return math_builder(ctx)().CreateFAdd(x, y);
case sub_float: return math_builder(ctx)().CreateFSub(x, y);
Expand Down

0 comments on commit 8f285bd

Please sign in to comment.