[PATCH] D25575: test-suite: try to force many FP-dependent tests to compile with unaggressive FP optimization, add support for per-ISA reference outputs
Abe Skolnik via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 13 14:33:53 PDT 2016
[On 10/13/2016, Renato Golin wrote:]
> I see where you're coming from, but changing the command line options that the user has explicitly passed is a bit devious.
> If we're going to change how we run on -Ofast/-ffast-math, I'd rather we didn't even run those tests than run them without the flags.
OK. The problem with the idea of not changing the optimization flags *_at all_* is the fact
that the FP contraction setting will then be unknown by default.
The problem with using the old "compile a short program locally, then run it locally to find
out" strategy here is that this will fail in a cross-built test run.
The best {cross-build}-compatible solution idea I/we [Sebastian+me] have come up with for the
above is like this:
* have a short program that tests the FP contraction setting[s]
1: compile that program for the target like any other test
2: at test time, have "lit" run this new program _first_ [i.e. before any other test] and
capture its result
3: for each test in "test-suite", disable its testing [to be clear: at test time]
if the new program indicates that FP contraction will cause a comparison failure
One good thing about the above technique is that it should work no matter which ISA[s] is/are
supported by the compiler being used to compile the tests, as opposed to a strategy of
something like "compile this short test program to assembler, grep the assembler for an FMA
instruction".
If anybody reading this has a better idea, then please suggest it and please provide enough
details that it will be possible to implement the idea from its description.
Regards,
Abe
> https://reviews.llvm.org/D25575
More information about the llvm-commits
mailing list