forked from OSchip/llvm-project
Reland "[FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support."
We currently have strict floating point/constrained floating point enabled for all targets. Constrained SDAG nodes get converted to the regular ones before reaching the target layer. In theory this should be fine. However, the changes are exposed to users through multiple clang options already in use in the field, and the changes are _completely_ _untested_ on almost all of our targets. Bugs have already been found, like "https://bugs.llvm.org/show_bug.cgi?id=45274". This patch disables constrained floating point options in clang everywhere except X86 and SystemZ. A warning will be printed when this happens. Use the new -fexperimental-strict-floating-point flag to force allowing strict floating point on hosts that aren't already marked as supporting it (X86 and SystemZ). Differential Revision: https://reviews.llvm.org/D80952
This commit is contained in:
parent
e1135b486a
commit
d4ce862f2a
|
@ -818,6 +818,10 @@ Discard value names in LLVM IR
|
|||
|
||||
Enables an experimental new pass manager in LLVM.
|
||||
|
||||
.. option:: -fexperimental-strict-floating-point
|
||||
|
||||
Enables the use of non-default rounding modes and non-default exception handling on targets that are not currently ready.
|
||||
|
||||
.. option:: -ffine-grained-bitfield-accesses, -fno-fine-grained-bitfield-accesses
|
||||
|
||||
Use separate accesses for consecutive bitfield runs with legal widths and alignments.
|
||||
|
|
|
@ -58,6 +58,8 @@ CODEGENOPT(DisableLLVMPasses , 1, 0) ///< Don't run any LLVM IR passes to get
|
|||
///< frontend.
|
||||
CODEGENOPT(DisableLifetimeMarkers, 1, 0) ///< Don't emit any lifetime markers
|
||||
CODEGENOPT(DisableO0ImplyOptNone , 1, 0) ///< Don't annonate function with optnone at O0
|
||||
CODEGENOPT(ExperimentalStrictFloatingPoint, 1, 0) ///< Enables the new, experimental
|
||||
///< strict floating point.
|
||||
CODEGENOPT(ExperimentalNewPassManager, 1, 0) ///< Enables the new, experimental
|
||||
///< pass manager.
|
||||
CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new
|
||||
|
|
|
@ -37,6 +37,12 @@ def note_fe_backend_plugin: Note<"%0">, BackendInfo;
|
|||
def warn_fe_override_module : Warning<
|
||||
"overriding the module target triple with %0">,
|
||||
InGroup<DiagGroup<"override-module">>;
|
||||
def warn_fe_backend_unsupported_fp_rounding : Warning<
|
||||
"overriding currently unsupported rounding mode on this target">,
|
||||
InGroup<UnsupportedFPOpt>;
|
||||
def warn_fe_backend_unsupported_fp_exceptions : Warning<
|
||||
"overriding currently unsupported use of floating point exceptions "
|
||||
"on this target">, InGroup<UnsupportedFPOpt>;
|
||||
|
||||
def remark_fe_backend_optimization_remark : Remark<"%0">, BackendInfo,
|
||||
InGroup<BackendOptimizationRemark>;
|
||||
|
|
|
@ -107,6 +107,7 @@ def DoublePromotion : DiagGroup<"double-promotion">;
|
|||
def EnumTooLarge : DiagGroup<"enum-too-large">;
|
||||
def UnsupportedNan : DiagGroup<"unsupported-nan">;
|
||||
def UnsupportedAbs : DiagGroup<"unsupported-abs">;
|
||||
def UnsupportedFPOpt : DiagGroup<"unsupported-floating-point-opt">;
|
||||
def UnsupportedCB : DiagGroup<"unsupported-cb">;
|
||||
def UnsupportedGPOpt : DiagGroup<"unsupported-gpopt">;
|
||||
def UnsupportedTargetOpt : DiagGroup<"unsupported-target-opt">;
|
||||
|
|
|
@ -272,6 +272,7 @@ LANGOPT(SinglePrecisionConstants , 1, 0, "treating double-precision floating poi
|
|||
LANGOPT(FastRelaxedMath , 1, 0, "OpenCL fast relaxed math")
|
||||
/// FP_CONTRACT mode (on/off/fast).
|
||||
BENIGN_ENUM_LANGOPT(DefaultFPContractMode, FPModeKind, 2, FPM_Off, "FP contraction type")
|
||||
COMPATIBLE_LANGOPT(ExpStrictFP, 1, false, "Enable experimental strict floating point")
|
||||
BENIGN_ENUM_LANGOPT(FPRoundingMode, RoundingMode, 3, RoundingMode::NearestTiesToEven, "FP Rounding Mode type")
|
||||
BENIGN_ENUM_LANGOPT(FPExceptionMode, FPExceptionModeKind, 2, FPE_Ignore, "FP Exception Behavior Mode type")
|
||||
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment")
|
||||
|
|
|
@ -192,6 +192,7 @@ protected:
|
|||
bool HasFloat128;
|
||||
bool HasFloat16;
|
||||
bool HasBFloat16;
|
||||
bool HasStrictFP;
|
||||
|
||||
unsigned char MaxAtomicPromoteWidth, MaxAtomicInlineWidth;
|
||||
unsigned short SimdDefaultAlign;
|
||||
|
@ -577,6 +578,9 @@ public:
|
|||
/// Determine whether the _BFloat16 type is supported on this target.
|
||||
virtual bool hasBFloat16Type() const { return HasBFloat16; }
|
||||
|
||||
/// Determine whether constrained floating point is supported on this target.
|
||||
virtual bool hasStrictFP() const { return HasStrictFP; }
|
||||
|
||||
/// Return the alignment that is suitable for storing any
|
||||
/// object with a fundamental alignment requirement.
|
||||
unsigned getSuitableAlign() const { return SuitableAlign; }
|
||||
|
|
|
@ -1243,6 +1243,9 @@ def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>
|
|||
def fexperimental_new_pass_manager : Flag<["-"], "fexperimental-new-pass-manager">,
|
||||
Group<f_clang_Group>, Flags<[CC1Option]>,
|
||||
HelpText<"Enables an experimental new pass manager in LLVM.">;
|
||||
def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">,
|
||||
Group<f_clang_Group>, Flags<[CC1Option]>,
|
||||
HelpText<"Enables experimental strict floating point in LLVM.">;
|
||||
def finput_charset_EQ : Joined<["-"], "finput-charset=">, Group<f_Group>;
|
||||
def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>;
|
||||
def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>,
|
||||
|
|
|
@ -37,6 +37,7 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
|
|||
HasFloat128 = false;
|
||||
HasFloat16 = false;
|
||||
HasBFloat16 = false;
|
||||
HasStrictFP = false;
|
||||
PointerWidth = PointerAlign = 32;
|
||||
BoolWidth = BoolAlign = 8;
|
||||
IntWidth = IntAlign = 32;
|
||||
|
|
|
@ -48,6 +48,7 @@ public:
|
|||
MinGlobalAlign = 16;
|
||||
resetDataLayout("E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64");
|
||||
MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
|
||||
HasStrictFP = true;
|
||||
}
|
||||
|
||||
void getTargetDefines(const LangOptions &Opts,
|
||||
|
|
|
@ -141,6 +141,7 @@ public:
|
|||
: TargetInfo(Triple) {
|
||||
LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
|
||||
AddrSpaceMap = &X86AddrSpaceMap;
|
||||
HasStrictFP = true;
|
||||
}
|
||||
|
||||
const char *getLongDoubleMangling() const override {
|
||||
|
|
|
@ -933,6 +933,19 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
|
|||
setAuxTarget(TargetInfo::CreateTargetInfo(getDiagnostics(), TO));
|
||||
}
|
||||
|
||||
if (!getTarget().hasStrictFP() && !getLangOpts().ExpStrictFP) {
|
||||
if (getLangOpts().getFPRoundingMode() !=
|
||||
llvm::RoundingMode::NearestTiesToEven) {
|
||||
getDiagnostics().Report(diag::warn_fe_backend_unsupported_fp_rounding);
|
||||
getLangOpts().setFPRoundingMode(llvm::RoundingMode::NearestTiesToEven);
|
||||
}
|
||||
if (getLangOpts().getFPExceptionMode() != LangOptions::FPE_Ignore) {
|
||||
getDiagnostics().Report(diag::warn_fe_backend_unsupported_fp_exceptions);
|
||||
getLangOpts().setFPExceptionMode(LangOptions::FPE_Ignore);
|
||||
}
|
||||
// FIXME: can we disable FEnvAccess?
|
||||
}
|
||||
|
||||
// Inform the target of the language options.
|
||||
//
|
||||
// FIXME: We shouldn't need to do this, the target should be immutable once
|
||||
|
|
|
@ -3281,6 +3281,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
|
|||
Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
|
||||
}
|
||||
|
||||
if (Args.hasArg(OPT_fexperimental_strict_floating_point))
|
||||
Opts.ExpStrictFP = true;
|
||||
|
||||
auto FPRM = llvm::RoundingMode::NearestTiesToEven;
|
||||
if (Args.hasArg(OPT_frounding_math)) {
|
||||
FPRM = llvm::RoundingMode::Dynamic;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// RUN: | opt -S -mem2reg | FileCheck --check-prefix=COMMON --check-prefix=COMMONIR --check-prefix=UNCONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -disable-O0-optnone -fallow-half-arguments-and-returns -emit-llvm -o - %s \
|
||||
// RUN: | opt -S -mem2reg | FileCheck --check-prefix=COMMON --check-prefix=COMMONIR --check-prefix=CONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
|
||||
|
@ -10,6 +11,7 @@
|
|||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
|
||||
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -disable-O0-optnone -fallow-half-arguments-and-returns -S -o - %s \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=COMMONIR --check-prefix=UNCONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-cpu cyclone \
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=COMMONIR --check-prefix=CONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-cpu cyclone \
|
||||
|
@ -10,6 +11,7 @@
|
|||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
|
||||
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-cpu cyclone \
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | llc -o=- - \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=COMMONIR --check-prefix=UNCONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-feature +fullfp16 -target-feature +v8.2a\
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -fallow-half-arguments-and-returns -flax-vector-conversions=none -S -disable-O0-optnone -emit-llvm -o - %s \
|
||||
// RUN: | opt -S -mem2reg \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=COMMONIR --check-prefix=CONSTRAINED %s
|
||||
|
@ -13,6 +14,7 @@
|
|||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
|
||||
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-feature +fullfp16 -target-feature +v8.2a\
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -fallow-half-arguments-and-returns -flax-vector-conversions=none -S -disable-O0-optnone -emit-llvm -o - %s \
|
||||
// RUN: | opt -S -mem2reg | llc -o=- - \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
|
||||
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 \
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -ffreestanding -disable-O0-optnone -emit-llvm %s -o - | \
|
||||
// RUN: opt -S -mem2reg | FileCheck -check-prefixes=COMMON,COMMONIR,CONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple arm64-linux-gnueabihf -target-feature +neon \
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -ffreestanding -disable-O0-optnone -emit-llvm %s -o - | \
|
||||
// RUN: opt -S -mem2reg | FileCheck -check-prefixes=COMMON,COMMONIR,CONSTRAINED %s
|
||||
|
||||
|
@ -23,10 +25,12 @@
|
|||
|
||||
// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 \
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -ffreestanding -disable-O0-optnone -emit-llvm %s -o - | \
|
||||
// RUN: opt -S -mem2reg | llc -o=- - | FileCheck -check-prefixes=COMMON,CHECK-ASM32 %s
|
||||
// RUN: %clang_cc1 -triple arm64-linux-gnueabihf -target-feature +neon \
|
||||
// RUN: -ffp-exception-behavior=strict \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -ffreestanding -disable-O0-optnone -emit-llvm %s -o - | \
|
||||
// RUN: opt -S -mem2reg | llc -o=- - | FileCheck -check-prefixes=COMMON,CHECK-ASM64 %s
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -emit-llvm -o - %s \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=COMMONIR --check-prefix=UNCONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -ffp-exception-behavior=strict -emit-llvm -o - %s \
|
||||
// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -fexperimental-strict-floating-point -ffp-exception-behavior=strict -emit-llvm -o - %s \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=COMMONIR --check-prefix=CONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -emit-llvm -o - %s | llc -o=- - \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
|
||||
// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -ffp-exception-behavior=strict -emit-llvm -o - %s | llc -o=- - \
|
||||
// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -fexperimental-strict-floating-point -ffp-exception-behavior=strict -emit-llvm -o - %s | llc -o=- - \
|
||||
// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
|
||||
|
||||
// REQUIRES: aarch64-registered-target
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
|
||||
// RUN: -emit-llvm %s -o - | FileCheck --check-prefix=CHECK-UNCONSTRAINED %s
|
||||
// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -ffp-exception-behavior=strict -emit-llvm %s -o - | FileCheck \
|
||||
// RUN: --check-prefix=CHECK-CONSTRAINED -vv %s
|
||||
// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
|
||||
// RUN: -fallow-half-arguments-and-returns -S -o - %s | \
|
||||
// RUN: FileCheck --check-prefix=CHECK-ASM --check-prefix=NOT-FIXME-CHECK %s
|
||||
// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
|
||||
// RUN: -fexperimental-strict-floating-point \
|
||||
// RUN: -fallow-half-arguments-and-returns -S -ffp-exception-behavior=strict \
|
||||
// RUN: -o - %s | FileCheck --check-prefix=CHECK-ASM \
|
||||
// RUN: --check-prefix=FIXME-CHECK %s
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// RUN: %clang_cc1 -triple mips64-linux-gnu -fexperimental-strict-floating-point -frounding-math -ffp-exception-behavior=strict -O2 -emit-llvm -o - %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -triple mips64-linux-gnu -fexperimental-strict-floating-point -ffp-exception-behavior=strict -O2 -emit-llvm -o - %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -triple mips64-linux-gnu -fexperimental-strict-floating-point -frounding-math -O2 -emit-llvm -o - %s | FileCheck %s
|
||||
//
|
||||
// Verify that constrained intrinsics are used due to the experimental flag.
|
||||
// As more targets gain support for constrained intrinsics the triple
|
||||
// in this test will need to change.
|
||||
|
||||
float fp_precise_1(float a, float b, float c) {
|
||||
// CHECK-LABEL: define float @_Z12fp_precise_1fff
|
||||
// CHECK: %[[M:.+]] = tail call float @llvm.experimental.constrained.fmul.f32(float {{.*}}, float {{.*}}, metadata {{.*}})
|
||||
// CHECK: tail call float @llvm.experimental.constrained.fadd.f32(float %[[M]], float %c, metadata {{.*}})
|
||||
return a * b + c;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
// RUN: %clang_cc1 -triple mips64-linux-gnu -frounding-math -ffp-exception-behavior=strict -O2 -verify=rounding,exception -emit-llvm -o - %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -triple mips64-linux-gnu -ffp-exception-behavior=strict -O2 -verify=exception -emit-llvm -o - %s | FileCheck %s
|
||||
// RUN: %clang_cc1 -triple mips64-linux-gnu -frounding-math -O2 -verify=rounding -emit-llvm -o - %s | FileCheck %s
|
||||
//
|
||||
// Verify that constrained intrinsics are not used.
|
||||
// As more targets gain support for constrained intrinsics the triple
|
||||
// in this test will need to change.
|
||||
|
||||
// rounding-warning@* {{overriding currently unsupported rounding mode on this target}}
|
||||
// exception-warning@* {{overriding currently unsupported use of floating point exceptions on this target}}
|
||||
float fp_precise_1(float a, float b, float c) {
|
||||
// CHECK: define float @_Z12fp_precise_1fff
|
||||
// CHECK: %[[M:.+]] = fmul float{{.*}}
|
||||
// CHECK: fadd float %[[M]], %c
|
||||
return a * b + c;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
// RUN: %clang_cc1 -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=FCMP
|
||||
// RUN: %clang_cc1 -ffp-exception-behavior=strict -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -ffp-exception-behavior=maytrap -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=MAYTRAP
|
||||
// RUN: %clang_cc1 -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=MAYTRAP
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=IGNORE
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=strict -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=maytrap -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=MAYTRAP
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=MAYTRAP
|
||||
|
||||
_Bool QuietEqual(double f1, double f2) {
|
||||
// CHECK-LABEL: define {{.*}}i1 @QuietEqual(double %f1, double %f2)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// RUN: %clang_cc1 -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=FCMP
|
||||
// RUN: %clang_cc1 -ffp-exception-behavior=strict -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -ffp-exception-behavior=maytrap -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=MAYTRAP
|
||||
// RUN: %clang_cc1 -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=MAYTRAP
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=IGNORE
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=strict -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=maytrap -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=MAYTRAP
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=MAYTRAP
|
||||
|
||||
_Bool QuietEqual(float f1, float f2) {
|
||||
// CHECK-LABEL: define {{.*}}i1 @QuietEqual(float %f1, float %f2)
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
// RUN: %clang_cc1 -ftrapping-math -frounding-math -ffp-exception-behavior=strict -emit-llvm -o - %s | FileCheck %s -check-prefix=FPMODELSTRICT
|
||||
// RUN: %clang_cc1 -ftrapping-math -frounding-math -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=FPMODELSTRICT
|
||||
// RUN: %clang_cc1 -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=PRECISE
|
||||
// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
|
||||
// RUN: %clang_cc1 -ffast-math -emit-llvm -o - %s | FileCheck %s -check-prefix=FASTNOCONTRACT
|
||||
// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
|
||||
// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=strict -emit-llvm -o - %s | FileCheck %s -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=maytrap -emit-llvm -o - %s | FileCheck %s -check-prefix=MAYTRAP
|
||||
// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=MAYTRAP
|
||||
|
||||
float f0, f1, f2;
|
||||
|
||||
void foo() {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
// RUN: %clang_cc1 -x c++ -ftrapping-math -fexceptions -fcxx-exceptions -frounding-math -ffp-exception-behavior=strict -emit-llvm -o - %s | FileCheck %s -check-prefix=FPMODELSTRICT
|
||||
// RUN: %clang_cc1 -x c++ -ftrapping-math -fexceptions -fcxx-exceptions -frounding-math -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=FPMODELSTRICT
|
||||
// RUN: %clang_cc1 -x c++ -ffp-contract=fast -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix=PRECISE
|
||||
// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
|
||||
// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix=FASTNOCONTRACT
|
||||
// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
|
||||
// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=strict -emit-llvm -o - %s | FileCheck %s -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=maytrap -emit-llvm -o - %s | FileCheck %s -check-prefix=MAYTRAP
|
||||
// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=EXCEPT
|
||||
// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=MAYTRAP
|
||||
|
||||
float f0, f1, f2;
|
||||
|
||||
template <class>
|
||||
|
|
Loading…
Reference in New Issue