<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 12, 2016, at 7:53 AM, Hal Finkel via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">----- Original Message -----</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">From: "Sebastian Pop" <<a href="mailto:sebpop.llvm@gmail.com" class="">sebpop.llvm@gmail.com</a>><br class="">To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>><br class="">Cc: "Renato Golin" <<a href="mailto:renato.golin@linaro.org" class="">renato.golin@linaro.org</a>>, "Sebastian Paul Pop" <<a href="mailto:s.pop@samsung.com" class="">s.pop@samsung.com</a>>, "llvm-dev"<br class=""><<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>, "Matthias Braun" <<a href="mailto:matze@braunis.de" class="">matze@braunis.de</a>>, "Clang Dev" <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>>, "nd"<br class=""><<a href="mailto:nd@arm.com" class="">nd@arm.com</a>>, "Abe Skolnik" <<a href="mailto:a.skolnik@samsung.com" class="">a.skolnik@samsung.com</a>><br class="">Sent: Wednesday, October 12, 2016 9:43:37 AM<br class="">Subject: Re: [test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"<br class=""><br class="">On Wed, Oct 12, 2016 at 10:28 AM, Hal Finkel <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:<br class=""><blockquote type="cite" class="">----- Original Message -----<br class=""><blockquote type="cite" class="">From: "Renato Golin" <<a href="mailto:renato.golin@linaro.org" class="">renato.golin@linaro.org</a>><br class="">To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>><br class="">Cc: "Sebastian Paul Pop" <<a href="mailto:s.pop@samsung.com" class="">s.pop@samsung.com</a>>, "llvm-dev"<br class=""><<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>, "Matthias Braun"<br class=""><<a href="mailto:matze@braunis.de" class="">matze@braunis.de</a>>, "Clang Dev" <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>>, "nd"<br class=""><<a href="mailto:nd@arm.com" class="">nd@arm.com</a>>, "Abe Skolnik" <<a href="mailto:a.skolnik@samsung.com" class="">a.skolnik@samsung.com</a>>,<br class="">"Sebastian Pop" <<a href="mailto:sebpop.llvm@gmail.com" class="">sebpop.llvm@gmail.com</a>><br class="">Sent: Wednesday, October 12, 2016 9:16:39 AM<br class="">Subject: Re: [test-suite] making polybench/symm succeed with<br class="">"-Ofast" and "-ffp-contract=on"<br class=""><br class="">On 12 October 2016 at 15:05, Hal Finkel <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:<br class=""><blockquote type="cite" class="">This is something we need to understand. No, there's not always<br class="">an<br class="">error bar. With FMA formation and without non-IEEE-compliant<br class="">optimizations (i.e. fast-math), the optimized answer should be<br class="">identical to the non-optimized answer.<br class=""></blockquote><br class="">What about architectures that this is never respected, like<br class="">Darwin?<br class=""><br class="">In the general case, indeed, optimisation levels should not change<br class="">the<br class="">IEEE representation and the tests should be deterministic.<br class=""><br class="">But we can't guarantee this will always be the case.<br class=""><br class=""><br class=""><blockquote type="cite" class="">We still do see cross-system discrepancies sometimes because of<br class="">differences in denormal handling, but on the same system that<br class="">should be consistent (aside, perhaps, from compiler-level<br class="">constant-folding issues).<br class=""></blockquote><br class="">But the test-suite doesn't run on a single system, nor it has one<br class="">reference_output for each system.<br class=""></blockquote><br class="">I agree and understand, and we may need a tolerance in practice to<br class="">deal with differences from denormal handling, etc. However, if<br class="">Sebastian is seeing differences on the same system, we should<br class="">understand why. Is he running on an ARM Darwin system, or an x86<br class="">using fp80 arithmetic,<br class=""></blockquote><br class="">My dev machine is an x86_64-linux.  This is where I ran all my<br class="">reported results.<br class="">How do I determine whether I am using fp80 arithmetic?<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I don't think that Clang/LLVM uses it by default on x86_64. If you're using -Ofast, however, that would explain it. I recommend looking at -O3 vs -O0 and make sure those are the same. -Ofast enables -ffast-math, which can legitimately cause differences.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div></div>On x86_64 we generally use the SSE units as much as possible because they are faster. The only exception to the rule is long double which uses x87/fp80. (32bit is a different story and generally uses more x87/fp80 because of ABI constraints).<div class=""><br class=""></div><div class="">- Matthias</div></body></html>