Test: Fix float test errors w/ Clang & fp-contract

The MD5 sums associated with FLOATTEST8=fp-contract and
FLOATTEST12=fp-contract are appropriate for GCC (tested v5 through v13)
with -ffp-contract=fast, which is the default when compiling for an
architecture that has fused multiply-add (FMA) instructions.  However,
different MD5 sums are needed for Clang (tested v5 through v14) with
-ffp-contract=on, which is now the default in Clang 14 when compiling
for an architecture that has FMA instructions.

Refer to #705, #709, #710
This commit is contained in:
DRC
2023-10-02 18:03:50 -04:00
parent c0412b56d6
commit 47656a0820

View File

@@ -874,14 +874,14 @@ endif()
# extensions
# no-fp-contract = validate against the expected results from the C code when
# floating point expression contraction is disabled (the
# default with Clang, with GCC when building for platforms
# that lack fused multiply-add [FMA] instructions, or when
# passing -ffp-contract=off to the compiler)
# default with Clang 13 and earlier, when building for
# platforms that lack fused multiply-add [FMA] instructions,
# or when passing -ffp-contract=off to GCC or Clang)
# fp-contract = validate against the expected results from the C code when
# floating point expression contraction is enabled (the default
# with GCC when building for platforms that have fused multiply-
# add [FMA] instructions or when passing -ffp-contract=fast to
# the compiler)
# with Clang 14 and later, with GCC when building for platforms
# that have fused multiply-add [FMA] instructions, or when
# passing -ffp-contract=fast to GCC or -ffp-contract=on to Clang)
# 387 = validate against the expected results from the C code when the 387 FPU
# is being used for floating point math (which is generally the default
# with x86 compilers)
@@ -1176,7 +1176,11 @@ foreach(libtype ${TEST_LIBTYPES})
set(MD5_PPM_3x2_FLOAT_NO_FP_CONTRACT ${MD5_PPM_3x2_FLOAT_SSE})
set(MD5_JPEG_3x2_FLOAT_PROG_FP_CONTRACT
${MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT})
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT ${MD5_PPM_3x2_FLOAT_SSE})
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT 2da9de6ae869e88b8372de815d366b03)
else()
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT ${MD5_PPM_3x2_FLOAT_SSE})
endif()
set(MD5_JPEG_3x2_FLOAT_PROG_387 bc6dbbefac2872f6b9d6c4a0ae60c3c0)
set(MD5_PPM_3x2_FLOAT_387 bcc5723c61560463ac60f772e742d092)
set(MD5_JPEG_3x2_FLOAT_PROG_MSVC e27840755870fa849872e58aa0cd1400)
@@ -1244,7 +1248,11 @@ foreach(libtype ${TEST_LIBTYPES})
set(MD5_PPM_3x2_FLOAT_NO_FP_CONTRACT f6bfab038438ed8f5522fbd33595dcdc)
set(MD5_JPEG_3x2_FLOAT_PROG_FP_CONTRACT
${MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT})
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT 0e917a34193ef976b679a6b069b1be26)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT ${MD5_PPM_3x2_FLOAT_NO_FP_CONTRACT})
else()
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT 0e917a34193ef976b679a6b069b1be26)
endif()
set(MD5_JPEG_3x2_FLOAT_PROG_387 1657664a410e0822c924b54f6f65e6e9)
set(MD5_PPM_3x2_FLOAT_387 cb0a1f027f3d2917c902b5640214e025)
set(MD5_JPEG_3x2_FLOAT_PROG_MSVC 7999ce9cd0ee9b6c7043b7351ab7639d)