forked from OSchip/llvm-project
Revert "[FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support."
My mistake, I had a blocking reviewer. This reverts commit39d2ae0afb
. This reverts commitbfdafa32a0
. This reverts commit2b35511350
. Differential Revision: https://reviews.llvm.org/D80952
This commit is contained in:
parent
af8389e131
commit
916e2ca997
|
@ -37,12 +37,6 @@ 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,7 +107,6 @@ 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">;
|
||||
|
|
|
@ -192,7 +192,6 @@ protected:
|
|||
bool HasFloat128;
|
||||
bool HasFloat16;
|
||||
bool HasBFloat16;
|
||||
bool HasStrictFP;
|
||||
|
||||
unsigned char MaxAtomicPromoteWidth, MaxAtomicInlineWidth;
|
||||
unsigned short SimdDefaultAlign;
|
||||
|
@ -578,9 +577,6 @@ 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; }
|
||||
|
|
|
@ -37,7 +37,6 @@ 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,7 +48,6 @@ 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,
|
||||
|
|
|
@ -138,7 +138,6 @@ public:
|
|||
: TargetInfo(Triple) {
|
||||
LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
|
||||
AddrSpaceMap = &X86AddrSpaceMap;
|
||||
HasStrictFP = true;
|
||||
}
|
||||
|
||||
const char *getLongDoubleMangling() const override {
|
||||
|
|
|
@ -933,19 +933,6 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
|
|||
setAuxTarget(TargetInfo::CreateTargetInfo(getDiagnostics(), TO));
|
||||
}
|
||||
|
||||
if (!getTarget().hasStrictFP()) {
|
||||
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
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
|
||||
// REQUIRES: aarch64-registered-target
|
||||
|
||||
// Disabled until constrained floating point is implemented for arm64.
|
||||
// XFAIL: *
|
||||
|
||||
// Test new aarch64 intrinsics and types but constrained
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
|
||||
// REQUIRES: aarch64-registered-target
|
||||
|
||||
// Disabled until constrained floating point is implemented for arm64.
|
||||
// XFAIL: *
|
||||
|
||||
// Test new aarch64 intrinsics and types but constrained
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
|
||||
// REQUIRES: aarch64-registered-target
|
||||
|
||||
// Disabled until constrained floating point is implemented for arm64.
|
||||
// XFAIL: *
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
// COMMON-LABEL: test_vsqrt_f16
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
|
||||
// REQUIRES: arm-registered-target,aarch64-registered-target
|
||||
|
||||
// Disabled until constrained floating point is implemented for arm64.
|
||||
// XFAIL: *
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
// COMMON-LABEL: test_vrndi_f32
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
// REQUIRES: aarch64-registered-target
|
||||
|
||||
// Disabled until constrained floating point is implemented for arm64.
|
||||
// XFAIL: *
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
float64x2_t rnd5(float64x2_t a) { return vrndq_f64(a); }
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
// RUN: -o - %s | FileCheck --check-prefix=CHECK-ASM \
|
||||
// RUN: --check-prefix=FIXME-CHECK %s
|
||||
|
||||
// Disabled until constrained floating point is completed for PowerPC.
|
||||
// XFAIL: *
|
||||
|
||||
typedef __attribute__((vector_size(4 * sizeof(float)))) float vec_float;
|
||||
typedef __attribute__((vector_size(2 * sizeof(double)))) double vec_double;
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
// 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: _Z12fp_precise_1fff
|
||||
// CHECK: %[[M:.+]] = fmul float{{.*}}
|
||||
// CHECK: fadd float %[[M]], %c
|
||||
return a * b + c;
|
||||
}
|
||||
|
||||
|
|
@ -5,9 +5,6 @@
|
|||
// 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
|
||||
|
||||
// Disabled until constrained floating point is completed for PowerPC.
|
||||
// XFAIL: powerpc, powerpc64, powerpc64le
|
||||
|
||||
_Bool QuietEqual(double f1, double f2) {
|
||||
// CHECK-LABEL: define {{.*}}i1 @QuietEqual(double %f1, double %f2)
|
||||
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
// 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
|
||||
|
||||
// Disabled until constrained floating point is completed for PowerPC.
|
||||
// XFAIL: powerpc, powerpc64, powerpc64le
|
||||
|
||||
_Bool QuietEqual(float f1, float f2) {
|
||||
// CHECK-LABEL: define {{.*}}i1 @QuietEqual(float %f1, float %f2)
|
||||
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
// 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
|
||||
|
||||
// Disabled until constrained floating point is completed for PowerPC.
|
||||
// XFAIL: powerpc, powerpc64, powerpc664le
|
||||
|
||||
float f0, f1, f2;
|
||||
|
||||
void foo() {
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
// 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
|
||||
|
||||
// Disabled until constrained floating point is completed for PowerPC.
|
||||
// XFAIL: powerpc, powerpc64, powerpc64le
|
||||
|
||||
float f0, f1, f2;
|
||||
|
||||
template <class>
|
||||
|
|
Loading…
Reference in New Issue