Skip to content

[flang] build test fix/suppression #118716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2024
Merged

[flang] build test fix/suppression #118716

merged 1 commit into from
Dec 4, 2024

Conversation

vdonaldson
Copy link
Contributor

No description provided.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:semantics labels Dec 4, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 4, 2024

@llvm/pr-subscribers-flang-fir-hlfir

@llvm/pr-subscribers-flang-semantics

Author: None (vdonaldson)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/118716.diff

3 Files Affected:

  • (modified) flang/test/Evaluate/fold-ieee.f90 (+1-1)
  • (modified) flang/test/Evaluate/folding18.f90 (+8-7)
  • (removed) flang/test/Lower/Intrinsics/ieee_underflow.f90 (-39)
diff --git a/flang/test/Evaluate/fold-ieee.f90 b/flang/test/Evaluate/fold-ieee.f90
index a74630d50933c8..bb7a7c24508bc1 100644
--- a/flang/test/Evaluate/fold-ieee.f90
+++ b/flang/test/Evaluate/fold-ieee.f90
@@ -58,7 +58,7 @@ module m
   logical, parameter :: test_sn_all = ieee_support_subnormal()
   logical, parameter :: test_sn_4 = ieee_support_subnormal(1.)
   logical, parameter :: test_sn_8 = ieee_support_subnormal(1.d0)
-  logical, parameter :: test_uc_all = .not. ieee_support_underflow_control()
+! logical, parameter :: test_uc_all = .not. ieee_support_underflow_control() ! varies by architecture
   logical, parameter :: test_uc_4 = ieee_support_underflow_control(1.)
   logical, parameter :: test_uc_8 = ieee_support_underflow_control(1.d0)
 end
diff --git a/flang/test/Evaluate/folding18.f90 b/flang/test/Evaluate/folding18.f90
index 9e2b0a8f05de8a..52aeb6a3532d0a 100644
--- a/flang/test/Evaluate/folding18.f90
+++ b/flang/test/Evaluate/folding18.f90
@@ -65,11 +65,12 @@ module m
     .and. ieee_support_subnormal(1.0_8) &
     .and. ieee_support_subnormal(1.0_10) &
     .and. ieee_support_subnormal(1.0_16)
-  logical, parameter :: test_ieee_support_underflow_control = .not. ieee_support_underflow_control() &
-    .and. .not. ieee_support_underflow_control(1.0_2) &
-    .and. ieee_support_underflow_control(1.0_3) &
-    .and. ieee_support_underflow_control(1.0_4) &
-    .and. ieee_support_underflow_control(1.0_8) &
-    .and. .not. ieee_support_underflow_control(1.0_10) &
-    .and. .not. ieee_support_underflow_control(1.0_16)
+! varies by architecture
+! logical, parameter :: test_ieee_support_underflow_control = .not. ieee_support_underflow_control() &
+!   .and. .not. ieee_support_underflow_control(1.0_2) &
+!   .and. ieee_support_underflow_control(1.0_3) &
+!   .and. ieee_support_underflow_control(1.0_4) &
+!   .and. ieee_support_underflow_control(1.0_8) &
+!   .and. .not. ieee_support_underflow_control(1.0_10) &
+!   .and. .not. ieee_support_underflow_control(1.0_16)
 end module
diff --git a/flang/test/Lower/Intrinsics/ieee_underflow.f90 b/flang/test/Lower/Intrinsics/ieee_underflow.f90
deleted file mode 100644
index 3170583e6e3aeb..00000000000000
--- a/flang/test/Lower/Intrinsics/ieee_underflow.f90
+++ /dev/null
@@ -1,39 +0,0 @@
-! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
-
-! CHECK-LABEL: c.func @_QPs
-subroutine s
-  ! CHECK:     %[[V_0:[0-9]+]] = fir.call @fetestexcept(%c-1{{.*}}) fastmath<contract> : (i32) -> i32
-  ! CHECK:     %[[V_1:[0-9]+]] = fir.call @feclearexcept(%[[V_0]]) fastmath<contract> : (i32) -> i32
-  ! CHECK:     %[[V_2:[0-9]+]] = fir.call @_FortranAGetUnderflowMode() fastmath<contract> : () -> i1
-  use ieee_arithmetic, only: ieee_get_underflow_mode, ieee_set_underflow_mode
-
-  ! CHECK:     %[[V_3:[0-9]+]] = fir.alloca !fir.logical<4> {bindc_name = "r", uniq_name = "_QFsEr"}
-  ! CHECK:     %[[V_4:[0-9]+]]:2 = hlfir.declare %[[V_3]] {uniq_name = "_QFsEr"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
-  logical r
-
-  ! CHECK:     %[[V_5:[0-9]+]] = fir.convert %false{{[_0-9]*}} : (i1) -> i1
-  ! CHECK:     %[[V_6:[0-9]+]] = fir.call @_FortranASetUnderflowMode(%[[V_5]]) fastmath<contract> : (i1) -> none
-  call ieee_set_underflow_mode(.false.)
-
-  ! CHECK:     %[[V_7:[0-9]+]] = fir.call @_FortranAGetUnderflowMode() fastmath<contract> : () -> i1
-  ! CHECK:     %[[V_8:[0-9]+]] = fir.convert %[[V_7]] : (i1) -> !fir.logical<4>
-  ! CHECK:     fir.store %[[V_8]] to %[[V_4]]#1 : !fir.ref<!fir.logical<4>>
-  call ieee_get_underflow_mode(r)
-! print*, r
-
-  ! CHECK:     %[[V_9:[0-9]+]] = fir.convert %true{{[_0-9]*}} : (i1) -> i1
-  ! CHECK:     %[[V_10:[0-9]+]] = fir.call @_FortranASetUnderflowMode(%[[V_9]]) fastmath<contract> : (i1) -> none
-  call ieee_set_underflow_mode(.true.)
-
-  ! CHECK:     %[[V_11:[0-9]+]] = fir.call @_FortranAGetUnderflowMode() fastmath<contract> : () -> i1
-  ! CHECK:     %[[V_12:[0-9]+]] = fir.convert %[[V_11]] : (i1) -> !fir.logical<4>
-  ! CHECK:     fir.store %[[V_12]] to %[[V_4]]#1 : !fir.ref<!fir.logical<4>>
-  call ieee_get_underflow_mode(r)
-! print*, r
-
-  ! CHECK:     %[[V_13:[0-9]+]] = fir.call @_FortranASetUnderflowMode(%[[V_2]]) fastmath<contract> : (i1) -> none
-  ! CHECK:     %[[V_14:[0-9]+]] = fir.call @feraiseexcept(%[[V_0]]) fastmath<contract> : (i32) -> i32
-end
-
-  call s
-end

@vdonaldson vdonaldson merged commit 17f99ac into llvm:main Dec 4, 2024
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang:semantics flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants