<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; "><br><div><div>On Sep 9, 2012, at 1:45 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">My idea had been to extend the IR to directly represent the concept of this operation. Currently, we have a 'br' instruction to represent binary control flow selection, and we have a 'switch' instruction to represent N-way control flow selection. We also have 'select' to represent binary value selection, but no instruction to represent N-way value selection. I suggested adding a new instruction 'selectswitch' (or some better name) to support selecting over N values based on an integer much the way switch works.</div><br class="Apple-interchange-newline"></blockquote></div><div><br></div><div>How would you use selectswitch ?  Will it allows you to do things that you can't do today ?</div><div><br></div><div><br></div><div>Thanks,</div><div>Nadav</div><div><br></div></body></html>