<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="">I just posted a long response on the thread, but it is important to know that these LLVM IR instructions are not defined and do not respect rounding mode or IEEE trapping flags.  Only the intrinsics do.<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 1, 2018, at 11:25 AM, Stephen Canon <<a href="mailto:scanon@apple.com" class="">scanon@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Wait, back up, what? The invalid flag raised by operations on sNaN is no different from any other flag in fenv. There’s nothing sensible about saying that every operation that raises underflow/overflow/inexact is undefined, why are operations on sNaN any different?<div class=""><br class=""></div><div class="">– Steve<br class=""><div class=""><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 28, 2018, at 11:41 PM, Chris Lattner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="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; float: none; display: inline !important;" class="">However, fdiv/fmul/etc are pervasively treated as not having side effects.  The intention, and the only sensible definition for them, is that they are undefined on SNaNs.  </span></div></blockquote></div><br class=""></div></div></div></div></div></blockquote></div><br class=""></div></body></html>