<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=""><div class="">Are we even at a point in the poison semantics discussion where we can reason about it? Is there a canonical description of poison at the moment which is in sync with LLVM (and alive)? The LLVM language reference doesn't even seem to mention the "poison filtering" effect of select; i.e. when the non-poison input of a select is taken no poison comes out of it. While such a semantic surely makes sense IMO, it only states that about Phi instructions at the moment...</div><div class=""><br class=""></div><div class="">Sorry for not being too helpful here and just answering with more questions.</div><div class="">- I assume matching for `select (i1, i8 freeze, i8 freeze)` like patterns would make this correct and as usefull again. But freeze is not part of official LLVM AFAIK.</div><div class="">- If this rule is considered a problem today, then we could probably move it to the SelectionDAG level.</div><div class=""><br class=""></div><div class="">- Matthias</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On May 22, 2017, at 1:32 PM, Sanjay Patel <<a href="mailto:spatel@rotateright.com" class="">spatel@rotateright.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Some InstCombine transforms for select-of-select were added here:<br class=""><a href="https://reviews.llvm.org/rL228409" class="">https://reviews.llvm.org/rL228409</a><br class=""><br class="">But Alive says this is more poisonous:<br class=""><br class="">Name: selsel<br class="">%s1 = select i1 %cond1, i8 C1, i8 C2<br class="">%s2 = select i1 %cond2, i8 %s1, i8 C2<br class="">  =><br class="">%andcond = and i1 %cond1, %cond2<br class="">%s2 = select i1 %andcond, i8 C1, i8 C2<br class=""><br class=""><a href="http://rise4fun.com/Alive/JT6" class="">http://rise4fun.com/Alive/JT6</a><br class=""><br class=""></div>Are those transforms legal?<br class=""><div class=""><div class=""><div class=""><br class=""></div></div></div></div>
</div></blockquote></div><br class=""></body></html>