[llvm-dev] [cfe-dev] a proposed script to help with test-suite programs that output _lots_ of FP numbers

Abe Skolnik via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 29 15:01:10 PDT 2016


["Hal Finkel" <hfinkel at anl.gov> wrote:]

> Recording the output with -ffp-contract=on to use as a reference output does not seem useful,
> exactly for the reasons you specify.  We should generate the reference outputs with -ffp-contract=off as we do now.
> That's the only good target-independent configuration.  Maybe we could do this:

>  - Have a reference output with -ffp-contract=off
>  - Run program compiled with -ffp-contract=off and the default
>  - Compare the former against the reference output for validation
>  - Compare the latter (the default build) against the former with fpcmp with some tolerance

> This also has the advantage that we still only need the hashed reference outputs in the repository.

Ah.  Interesting idea.  So please tell me if I have understood you correctly.  I think you 
[Hal] are suggesting something like this:

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

   2) if comparison against reference hash says "not equal", fail the test and stop [stop 
testing this particular subtest, that is]

   3) compile the program with FP fusion on/"fast", capture the output,
      compare 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?

Regards,

Abe



More information about the llvm-dev mailing list