[cfe-dev] [test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"

Renato Golin via cfe-dev cfe-dev at lists.llvm.org
Fri Oct 14 08:36:12 PDT 2016


On 14 October 2016 at 15:50, Sebastian Pop <sebpop.llvm at gmail.com> wrote:
> These 3 tests are passing with the following configurations:
> -O3 -ffp-contract=off
> -O3 -ffp-contract=on
> -O0 -ffp-contract=off
> -O0 -ffp-contract=on
>
> They are not passing at:
> -Ofast -ffp-contract=on
> -Ofast -ffp-contract=off

Let's separate completely FP-contract and fast-math. They're different
things and need different solutions.


> if(TEST_SUITE_USES_FAST_MATH)
>   add_definitions(-DFP_ABSTOLERANCE=1e0)
> else()
>   add_definitions(-DFP_ABSTOLERANCE=1e-5)
> endif()

This doesn't make sense. If my program decreased precision by 5 orders
of magnitude with -ffast-math, I'd be *very* worried.

I hope that fast-math in Clang isn't that broken, so that's probably
to do with the assumptions in the output reduction phase.

But, as I said, let's do Ofast *later*. One thing at a time.

cheers,
--renato



More information about the cfe-dev mailing list