<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Aren’t you all (Intel) the ones promoting <font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">-f(no-)protect-parens, which is a command line flag that overrides source code semantics in _exactly_ the same manner?</span></font><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font color="#000000" class=""><span style="caret-color: rgb(0, 0, 0);" class="">– Steve<br class=""></span></font><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 30, 2021, at 1:30 PM, Keane, Erich <<a href="mailto:erich.keane@intel.com" class="">erich.keane@intel.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">It seems awkward to me that we have a command-line switch that overrides source code to this extent.  Typically our command-line arguments cause us to change ‘defaults’, rarely do they cause us to ignore the source code.  IMO, there is a bit of a natural ‘order’ to where how an option like this should be specified, that is, code overrides command line overrides default.<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">At bare minimum, having a pragma like this that is supported, but just ignored in this case needs to have some level of diagnostic.  Silently ignoring a developer’s preference is the worst thing we can do.<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Steve (Numerics) Canon <<a href="mailto:scanon@apple.com" class="">scanon@apple.com</a>><span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, June 30, 2021 10:20 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Kaylor, Andrew <<a href="mailto:andrew.kaylor@intel.com" class="">andrew.kaylor@intel.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>>; <a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>; <a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>; Yaxun Liu <<a href="mailto:yaxun.liu@amd.com" class="">yaxun.liu@amd.com</a>>; Keane, Erich <<a href="mailto:erich.keane@intel.com" class="">erich.keane@intel.com</a>>; Blower, Melanie I <<a href="mailto:melanie.blower@intel.com" class="">melanie.blower@intel.com</a>>; Sanjay Patel <<a href="mailto:spatel@rotateright.com" class="">spatel@rotateright.com</a>>; Renato Golin <<a href="mailto:rengolin@gmail.com" class="">rengolin@gmail.com</a>>; Hal Finkel <<a href="mailto:hal.finkel.llvm@gmail.com" class="">hal.finkel.llvm@gmail.com</a>>; <a href="mailto:guille@berkeley.edu" class="">guille@berkeley.edu</a>; <a href="mailto:ueno.masakazu@jp.fujitsu.com" class="">ueno.masakazu@jp.fujitsu.com</a>; <a href="mailto:Matthew.Arsenault@amd.com" class="">Matthew.Arsenault@amd.com</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: fp-contract=fast and pragmas<o:p class=""></o:p></div></div></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">It sounds to me like this test is simply incompatible with fp-contract=fast and should not be used in that mode.<o:p class=""></o:p></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">– Steve<o:p class=""></o:p></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Jun 30, 2021, at 11:14 AM, Kaylor, Andrew <<a href="mailto:andrew.kaylor@intel.com" style="color: blue; text-decoration: underline;" class="">andrew.kaylor@intel.com</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi John,<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Let me be clarify that ICC-compatibility isn’t my goal here. We can do that out-of-tree for Intel compilers based on LLVM.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">My motivation is a problem I’m working on with the LLVM test suite. The Polybench benchmarks in the test are currently attempting to use ‘#pragma STDC FP_CONTRACT OFF’ to create a value-safe kernel whose results can be compared against an otherwise identical kernel that is compiled with whatever options the test suite is configured to use. This strategy fails if the test suite is configured to compile with ‘-ffp-contract=fast’. That’s the problem I’m trying to solve by having clang respect the pragma.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">See<span class="apple-converted-space"> </span><a href="https://reviews.llvm.org/D25346" style="color: blue; text-decoration: underline;" class="">https://reviews.llvm.org/D25346</a>,<span class="apple-converted-space"> </span><a href="https://reviews.llvm.org/D102861" style="color: blue; text-decoration: underline;" class="">https://reviews.llvm.org/D102861</a>, and<span class="apple-converted-space"> </span><a href="https://reviews.llvm.org/D104935" style="color: blue; text-decoration: underline;" class="">https://reviews.llvm.org/D104935</a>.</div></div></div></blockquote></div></div></div></div></blockquote></div><br class=""></div></body></html>