<div dir="ltr"><div>For reference, some patches based on this discussion:<br><a href="https://reviews.llvm.org/D44258" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D44258</a><br><a href="https://reviews.llvm.org/D44216">https://reviews.llvm.org/D44216</a><br><a href="https://reviews.llvm.org/D44308">https://reviews.llvm.org/D44308</a><br><a href="https://reviews.llvm.org/D44318">https://reviews.llvm.org/D44318</a><br><br></div>Thanks to all for your help cleaning this up.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 6, 2018 at 2:27 PM, Stephen Canon <span dir="ltr"><<a href="mailto:scanon@apple.com" target="_blank">scanon@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><span class=""><br><div><br><blockquote type="cite"><div>On Mar 6, 2018, at 4:25 PM, Chris Lattner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_-8840463463407796161Apple-interchange-newline"><div><div style="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;text-decoration:none"><br class="m_-8840463463407796161Apple-interchange-newline"><br><blockquote type="cite"><div>On Mar 6, 2018, at 7:23 AM, Sanjay Patel via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_-8840463463407796161Apple-interchange-newline"><div><div dir="ltr"><div>I need to review the last thread about undef/poison (or someone who knows current status of that can reply), but this would seem to come down to whether undef applies to the entire value or the individual bits?<br></div>Ie, in your example the sign bit will never be set unless all of the exponent bits are also set. Each bit individually is unknown, but taken together we know that some sequences are impossible.<br></div></div></blockquote><div><br></div><div>The “on the ground” reason we made undef be a bit-level concept for integers was specific problems with C bitfields: when initializing a mem2reg’d bitfield, you end up doing or’s into undef values, and those bits have to be defined.  </div><div><br></div><div>I’m not aware of a similar concept that makes sense for fp values.  We could choose to do fine grain tracking (e.g. so ldexp and friends would work to set the exponent??) but I don’t see any practical reason for doing so.</div></div></div></blockquote><br></div></span><div>I agree. Tracking the signbit might be interesting sometimes, but it’s a second-order effect.</div><br><div>– Steve</div></div></blockquote></div><br></div>