Skip to content

Commit f2fe54d

Browse files
authored
Fix 453.povray test on LoongArch (#41)
453.povray ref test failed when running SPEC CPU2006 1.1 on a LoongArch host with clang-18. This patch disables fp-contract to keep the generated SPEC-benchmark.tga same with the reference. For more information about the change of the default behavior of fp-contract, see: https://bugs.llvm.org/show_bug.cgi?id=51346
1 parent df12da5 commit f2fe54d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

External/SPEC/CFP2006/453.povray/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
list(APPEND LDFLAGS -lm)
22

3-
if(ARCH STREQUAL "AArch64")
4-
# On AArch64 and for C/C++ the new behavior is to flip 'fpp-contract' to
5-
# 'on'. This breaks floating point comparison of results.
3+
if(ARCH STREQUAL "AArch64" OR ARCH STREQUAL "LoongArch")
4+
# On AArch64/LoongArch and for C/C++ the new behavior is to flip
5+
# '-ffp-contract' to 'on'. This breaks floating point comparison
6+
# of results.
67
# Turn off the flag so that the result image matches the reference
78
# output.
89
list(APPEND CXXFLAGS -ffp-contract=off)

0 commit comments

Comments
 (0)