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

Hal Finkel via cfe-dev cfe-dev at lists.llvm.org
Wed Oct 12 07:49:17 PDT 2016


----- Original Message -----
> From: "Renato Golin" <renato.golin at linaro.org>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "Sebastian Paul Pop" <s.pop at samsung.com>, "llvm-dev" <llvm-dev at lists.llvm.org>, "Matthias Braun"
> <matze at braunis.de>, "Clang Dev" <cfe-dev at lists.llvm.org>, "nd" <nd at arm.com>, "Abe Skolnik" <a.skolnik at samsung.com>,
> "Sebastian Pop" <sebpop.llvm at gmail.com>
> Sent: Wednesday, October 12, 2016 9:43:06 AM
> Subject: Re: [test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
> 
> On 12 October 2016 at 15:28, Hal Finkel <hfinkel at anl.gov> wrote:
> > I agree and understand, and we may need a tolerance in practice to
> > deal with differences from denormal handling, etc. However, if
> > Sebastian is seeing differences on the same system, we should
> > understand why. Is he running on an ARM Darwin system, or an x86
> > using fp80 arithmetic, etc.? (Senastian?)
> 
> Oh, I didn't mean that. But since we will run the same tests on
> Darwin
> and x86-fp80, the results need to take that into account from the
> beginning.
> 
> Though, I recall Sebastian was using -Ofast, which does turn
> -ffast-math, so the same idea applies, no?

Ah, yes! I thought he was looking at the two separately, but if he's always using -Ofast, then he's always getting -ffast-math operations. Making the tests work with -ffast-math is definitely useful, but I recommend looking at -ffast-math (which might reduce accuracy) and -ffp-contract=on separately, and just look at -ffp-contract=on first.

 -Hal

> 
> cheers,
> --renato
> 

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory



More information about the cfe-dev mailing list