[flang-commits] [flang] c9a4c51 - [flang] Fix test on ppc64le & aarch64 (#105439)

via flang-commits flang-commits at lists.llvm.org
Tue Aug 20 15:01:12 PDT 2024


Author: Peter Klausler
Date: 2024-08-20T15:01:07-07:00
New Revision: c9a4c51bb0018778bb78871e555b06613530f155

URL: https://github.com/llvm/llvm-project/commit/c9a4c51bb0018778bb78871e555b06613530f155
DIFF: https://github.com/llvm/llvm-project/commit/c9a4c51bb0018778bb78871e555b06613530f155.diff

LOG: [flang] Fix test on ppc64le & aarch64 (#105439)

Don't try to fold x87 extended precision operations in a test unless
it's targeting x86-64.

Added: 
    

Modified: 
    flang/test/Evaluate/fold-nearest.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Evaluate/fold-nearest.f90 b/flang/test/Evaluate/fold-nearest.f90
index b20c831c67414..48b9ef37840e3 100644
--- a/flang/test/Evaluate/fold-nearest.f90
+++ b/flang/test/Evaluate/fold-nearest.f90
@@ -92,20 +92,23 @@ module m3
   logical, parameter :: test_14 = .not. (x14 == x14)
 end module
 
-#if 0
-! Currently failing on ppc64le and aarch64, debugging...
 module m4
+  use ieee_arithmetic
+  real(2), parameter :: neg_inf_2 = real(z'fc00',2)
+  real(2), parameter :: neg_huge_2 = real(z'fbff',2)
+  real(3), parameter :: neg_huge_3 = real(z'ff7f',3)
+  logical, parameter :: test_1 = ieee_next_after(neg_inf_2, neg_huge_3) == neg_huge_2
+end module
+
+#if __x86_64__
+module m5
   use ieee_arithmetic
   real(8), parameter :: neg_inf_8  = real(z'fff0000000000000',8)
   real(8), parameter :: neg_huge_8 = real(z'ffefffffffffffff',8)
   real(10), parameter :: neg_one_10 = real(z'bfff8000000000000000',10)
   real(10), parameter :: neg_inf_10 = real(z'ffff8000000000000000',10)
-  real(2), parameter :: neg_inf_2 = real(z'fc00',2)
-  real(2), parameter :: neg_huge_2 = real(z'fbff',2)
-  real(3), parameter :: neg_huge_3 = real(z'ff7f',3)
-  logical, parameter :: test_1 = ieee_next_after(neg_inf_8,neg_one_10) == neg_huge_8
-  logical, parameter :: test_2 = ieee_next_after(neg_inf_2, neg_huge_3) == neg_huge_2
-  logical, parameter :: test_3 = ieee_next_after(neg_one_10, neg_inf_10) == &
+  logical, parameter :: test_1 = ieee_next_after(neg_inf_8, neg_one_10) == neg_huge_8
+  logical, parameter :: test_2 = ieee_next_after(neg_one_10, neg_inf_10) == &
                                  real(z'bfff8000000000000001', 10)
 end module
 #endif


        


More information about the flang-commits mailing list