<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;"><div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br><blockquote type="cite">For DIV/MOD you can blend the inputs BEFORE the operation. You can<br>place ones or zeros depending on the operation.<span class="Apple-converted-space"> </span><br></blockquote><br>Quick follow-up on this. What about using "undef" as the input for<br>false items:<br><br>tv1 = select mask, v1, undef<br>tv2 = select mask, v2, undef<br>tv3 = div tv1, tv2<br>v3 = select mask, tv3, undef<br><br>I'm always confused about the semantics of undef. Is the above safe<br>code? It would simplify things a bit not to have to track which input<br>values are safe based on the context of an operation.<br><br> -David</div></blockquote></div><br><div>This is not a correct use of undef. I think that InstCombine/DagCombine will optimize tv1 into 'undef'. </div></body></html>