Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/liboslexec/llvm_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1529,9 +1529,15 @@ LLVM_Util::make_jit_execengine(std::string* err, TargetISA requestedISA,

llvm::TargetOptions options;
// Enables FMA's in IR generation.
// However cpu feature set may or may not support FMA's independently
options.AllowFPOpFusion = jit_fma() ? llvm::FPOpFusion::Fast
: llvm::FPOpFusion::Standard;
// However cpu feature set may or may not support FMA's independently.
// Note: This is confusingly named, LLVM's FPOpFution choices are Strict
// (no fma used), Standard (fma used for actual fma circumstances), and
// Fast (fused ops beyond just fma's, any time it thinks it will be
// faster). Since we call the option "jit_fma", we interpret that as
// switching between Strict and Standard. We will need some other control
// if we ever want full "Fast" mode.
options.AllowFPOpFusion = jit_fma() ? llvm::FPOpFusion::Standard
: llvm::FPOpFusion::Strict;
// Unfortunately enabling UnsafeFPMath allows reciprocals, which we don't want for divides
// To match results for existing unit tests we might need to disable UnsafeFPMath
// TODO: investigate if reciprocals can be disabled by other means.
Expand Down
Binary file not shown.
Loading