[flang-commits] [flang] [flang] Corrected constant folding for IEEE_OTHER in IEEE_SUPPORT_ROUNDING (PR #197534)

via flang-commits flang-commits at lists.llvm.org
Thu May 14 09:46:24 PDT 2026


================
@@ -930,7 +930,8 @@ Expr<Type<TypeCategory::Logical, KIND>> FoldIntrinsicFunction(
     if (context.targetCharacteristics().ieeeFeatures().test(
             IeeeFeature::Rounding)) {
       if (auto mode{GetRoundingMode(args[0])}) {
-        return Expr<T>{mode != common::RoundingMode::TiesAwayFromZero};
+        return Expr<T>{mode >= common::RoundingMode::ToZero &&
----------------
kwyatt-ext wrote:

Fair.  Removed the always true condition.

https://github.com/llvm/llvm-project/pull/197534


More information about the flang-commits mailing list