Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Codegen][LLVM] Add ability to turn on fast math flags #9223

Merged
merged 16 commits into from
Oct 19, 2021
Prev Previous commit
Next Next commit
prevent regression in llvm
AndrewZhaoLuo committed Oct 18, 2021
commit cfeb699b09da372f3f9807a1b24c5e291b82c9d0
2 changes: 1 addition & 1 deletion src/target/llvm/llvm_common.cc
Original file line number Diff line number Diff line change
@@ -142,7 +142,7 @@ std::unique_ptr<llvm::TargetMachine> GetLLVMTargetMachine(const Target& target,
return nullptr;
}

Integer llvm_opt_level = target->GetAttr<Integer>("O").value_or(Integer(2));
Integer llvm_opt_level = target->GetAttr<Integer>("O").value_or(Integer(3));
llvm::CodeGenOpt::Level llvm_opt;
if (llvm_opt_level <= 0) {
llvm_opt = llvm::CodeGenOpt::None;