From 0dbcf1b9569f3fafa1e5a147213caad052c66d30 Mon Sep 17 00:00:00 2001 From: V Donaldson Date: Wed, 5 Feb 2025 15:49:40 -0800 Subject: [PATCH] [flang] Modificaitons to ieee_support_standard The result of a call to ieee_support_halting is one of the components that affect the result of a call to ieee_support_standard. --- flang/include/flang/Evaluate/target.h | 7 ++++--- flang/include/flang/Tools/TargetSetup.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/flang/include/flang/Evaluate/target.h b/flang/include/flang/Evaluate/target.h index e07f916b875e0..44c552b99cf4e 100644 --- a/flang/include/flang/Evaluate/target.h +++ b/flang/include/flang/Evaluate/target.h @@ -143,9 +143,10 @@ class TargetCharacteristics { std::string compilerOptionsString_; std::string compilerVersionString_; IeeeFeatures ieeeFeatures_{IeeeFeature::Denormal, IeeeFeature::Divide, - IeeeFeature::Flags, IeeeFeature::Inf, IeeeFeature::Io, IeeeFeature::NaN, - IeeeFeature::Rounding, IeeeFeature::Sqrt, IeeeFeature::Standard, - IeeeFeature::Subnormal, IeeeFeature::UnderflowControl}; + IeeeFeature::Flags, IeeeFeature::Halting, IeeeFeature::Inf, + IeeeFeature::Io, IeeeFeature::NaN, IeeeFeature::Rounding, + IeeeFeature::Sqrt, IeeeFeature::Standard, IeeeFeature::Subnormal, + IeeeFeature::UnderflowControl}; }; } // namespace Fortran::evaluate diff --git a/flang/include/flang/Tools/TargetSetup.h b/flang/include/flang/Tools/TargetSetup.h index 5d23df6823a94..d167f44fe2fd7 100644 --- a/flang/include/flang/Tools/TargetSetup.h +++ b/flang/include/flang/Tools/TargetSetup.h @@ -25,8 +25,6 @@ namespace Fortran::tools { const llvm::Triple &targetTriple{targetMachine.getTargetTriple()}; - targetCharacteristics.set_ieeeFeature(evaluate::IeeeFeature::Halting, true); - if (targetTriple.getArch() == llvm::Triple::ArchType::x86_64) { targetCharacteristics.set_hasSubnormalFlushingControl(/*kind=*/3); targetCharacteristics.set_hasSubnormalFlushingControl(/*kind=*/4); @@ -37,6 +35,8 @@ namespace Fortran::tools { targetCharacteristics.set_haltingSupportIsUnknownAtCompileTime(); targetCharacteristics.set_ieeeFeature( evaluate::IeeeFeature::Halting, false); + targetCharacteristics.set_ieeeFeature( + evaluate::IeeeFeature::Standard, false); targetCharacteristics.set_hasSubnormalFlushingControl(/*kind=*/3); targetCharacteristics.set_hasSubnormalFlushingControl(/*kind=*/4); targetCharacteristics.set_hasSubnormalFlushingControl(/*kind=*/8);