forked from OSchip/llvm-project
[flang] Remove warnings that fast-math options are unimplemented
These are now fully implemented, see https://reviews.llvm.org/D137390 https://reviews.llvm.org/D137391 https://reviews.llvm.org/D137456 https://reviews.llvm.org/D137580 https://reviews.llvm.org/D137602 https://reviews.llvm.org/D138048 These flags are still tested in flang/test/Driver/frontend-forwarding.f90 and flang/test/Lower/fast-math-arithmetic.f90 Differential revision: https://reviews.llvm.org/D138907
This commit is contained in:
parent
dee009d3b5
commit
6841c43f36
|
@ -677,8 +677,6 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc,
|
|||
llvm::opt::ArgList &args,
|
||||
clang::DiagnosticsEngine &diags) {
|
||||
LangOptions &opts = invoc.getLangOpts();
|
||||
const unsigned diagUnimplemented = diags.getCustomDiagID(
|
||||
clang::DiagnosticsEngine::Warning, "%0 is not currently implemented");
|
||||
|
||||
if (const llvm::opt::Arg *a =
|
||||
args.getLastArg(clang::driver::options::OPT_ffp_contract)) {
|
||||
|
@ -695,43 +693,36 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc,
|
|||
return false;
|
||||
}
|
||||
|
||||
diags.Report(diagUnimplemented) << a->getOption().getName();
|
||||
opts.setFPContractMode(fpContractMode);
|
||||
}
|
||||
|
||||
if (const llvm::opt::Arg *a =
|
||||
args.getLastArg(clang::driver::options::OPT_menable_no_infinities)) {
|
||||
diags.Report(diagUnimplemented) << a->getOption().getName();
|
||||
opts.NoHonorInfs = true;
|
||||
}
|
||||
|
||||
if (const llvm::opt::Arg *a =
|
||||
args.getLastArg(clang::driver::options::OPT_menable_no_nans)) {
|
||||
diags.Report(diagUnimplemented) << a->getOption().getName();
|
||||
opts.NoHonorNaNs = true;
|
||||
}
|
||||
|
||||
if (const llvm::opt::Arg *a =
|
||||
args.getLastArg(clang::driver::options::OPT_fapprox_func)) {
|
||||
diags.Report(diagUnimplemented) << a->getOption().getName();
|
||||
opts.ApproxFunc = true;
|
||||
}
|
||||
|
||||
if (const llvm::opt::Arg *a =
|
||||
args.getLastArg(clang::driver::options::OPT_fno_signed_zeros)) {
|
||||
diags.Report(diagUnimplemented) << a->getOption().getName();
|
||||
opts.NoSignedZeros = true;
|
||||
}
|
||||
|
||||
if (const llvm::opt::Arg *a =
|
||||
args.getLastArg(clang::driver::options::OPT_mreassociate)) {
|
||||
diags.Report(diagUnimplemented) << a->getOption().getName();
|
||||
opts.AssociativeMath = true;
|
||||
}
|
||||
|
||||
if (const llvm::opt::Arg *a =
|
||||
args.getLastArg(clang::driver::options::OPT_freciprocal_math)) {
|
||||
diags.Report(diagUnimplemented) << a->getOption().getName();
|
||||
opts.ReciprocalMath = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
! Test for handling of floating point options within the frontend driver
|
||||
|
||||
! RUN: %flang_fc1 \
|
||||
! RUN: -ffp-contract=fast \
|
||||
! RUN: -menable-no-infs \
|
||||
! RUN: -menable-no-nans \
|
||||
! RUN: -fapprox-func \
|
||||
! RUN: -fno-signed-zeros \
|
||||
! RUN: -mreassociate \
|
||||
! RUN: -freciprocal-math \
|
||||
! RUN: %s 2>&1 | FileCheck %s
|
||||
! CHECK: ffp-contract= is not currently implemented
|
||||
! CHECK: menable-no-infs is not currently implemented
|
||||
! CHECK: menable-no-nans is not currently implemented
|
||||
! CHECK: fapprox-func is not currently implemented
|
||||
! CHECK: fno-signed-zeros is not currently implemented
|
||||
! CHECK: mreassociate is not currently implemented
|
||||
! CHECK: freciprocal-math is not currently implemented
|
Loading…
Reference in New Issue