[cfe-dev] [llvm-dev] improving test-suite`s FP subtests to be able to compare both exact-match outputs and more-optimized builds that may have different outputs due to FP optimizations

Abe Skolnik via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 29 15:59:46 PDT 2016


Dear all,

I would like some help, please, with implementing Hal`s excellent suggestion, which I have 
reworded as below.  Hal has confirmed a previous version of my rewording as a correct 
interpretation.  [I made minor changes since then, e.g. for grammar.]

[Abe wrote:]

>> I think you [Hal] are suggesting something like this:

>>    1) compile the program with FP fusion off,
>>       run the program, capture the output and save it,
>>       hash it and compare it against the reference hash.

>>    2) if comparison against the reference hash says "not equal",
>>       fail the test and stop [i.e. stop testing this particular subtest]

>>    3) compile the program with FP fusion on/"fast", capture the output,
>>       compare it using "fpcmp" and some positive tolerance against the
>>       output of the non-fusion build of the same source code;
>>       fail only if outside the tolerance limit[s]

>> Is that right?

[Hal wrote:]

> Correct.


As of now, I do not understand how to make a single directory and its contained source code 
compile to more than one program and trigger more than one test run.  I think I understand 
Makefiles well enough to make that happen, but I`m pretty sure I _don`t_ understand either { 
[1] CMake in general or [2] test-suite`s use of it specifically } well enough to do this 
without any help.  Maybe the "solution" is to have new directories with symlinks to the 
existing source code?

The help in question could be as minimal as "look here" with a Web link, if the link in 
question would guide me towards enlightenment.  ;-)

Regards,

Abe


More information about the cfe-dev mailing list