<div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>>  Would it be correct to resolve this by saying that dereferenceable(N)<br>> *implies* not_poison? This would be helpful as a clarification of how<br>> it all fits together. </div><div> <br></div><div>Yes, I think it makes sense.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 19, 2020 at 12:14 PM Nicolai Hähnle <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Feb 19, 2020 at 3:51 AM Juneyoung Lee via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> I think not_poison (Johannes's used keyword) makes sense. We can simulate the original UB semantics by simply attaching it, as explained.<br>
> For the attributes other than nonnull, we may need more discussion; align attribute seems to be okay with defining it as poison, dereferenceable may need UB even without nonnull (because it needs to be non-poison as shown Nuno's hoisting example).<br>
<br>
For reference, the hoisting example was:<br>
<br>
f(dereferenceable(4) %p) {<br>
  loop() {<br>
    %v = load %p<br>
    use(%v)<br>
  }<br>
}<br>
=><br>
f(dereferenceable(4) %p) {<br>
  %v = load %p<br>
  loop() {<br>
    use(%v)<br>
  }<br>
}<br>
<br>
Would it be correct to resolve this by saying that dereferenceable(N)<br>
*implies* not_poison? This would be helpful as a clarification of how<br>
it all fits together.<br>
<br>
Cheers,<br>
Nicolai<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><br></div><font size="1">Juneyoung Lee</font><div><font size="1">Software Foundation Lab, Seoul National University</font></div></div></div></div>