[PATCH] D129017: [fpcmp] Use non-floating point parsing by default.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 09:43:16 PDT 2022


MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.

LGTM

BTW: I always wanted to switch the tools to use `diff` by default which is faster and produces more helpful output in case of differences; and only use fpcmp for the few benchmarks that need float tolerances. Anyway this change makes sense in the meantime.



================
Comment at: MultiSource/Benchmarks/TSVC/CMakeLists.txt:1-5
+
+# Expect exact numeric results. However, the libc printf implementation emits
+# 'E' in scientific notation, while the reference output contains 'e'.
+set(FP_ABSTOLERANCE 0.0)
+
----------------
I wonder if we shouldn't rather change the reference output. But fine with me if things aren't that easy to fix.


================
Comment at: tools/fpcmp.c:385-386
+      "(even if zero), floating numbers are parsed and considered equal if "
+      "neither the absolute nor relative tolerance is exceeded.");
+  fprintf(stderr, "The -i switch also ignores whitespace differences\n");
   exit(2);
----------------
Why didn't you also combine the last string with the others?


Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129017/new/

https://reviews.llvm.org/D129017



More information about the llvm-commits mailing list