<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Resending. This reply did not show up on Phabricator.<br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; color:rgba(0, 0, 0, 1.0);"><b>From: </b></span><span style="font-family:'Helvetica';">Gerolf Hoflehner <<a href="mailto:ghoflehner@apple.com">ghoflehner@apple.com</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; color:rgba(0, 0, 0, 1.0);"><b>Subject: </b></span><span style="font-family:'Helvetica';"><b>Re: [PATCH] Select elimination pass</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span style="font-family:'Helvetica';">September 2, 2014 at 1:43:14 PM PDT<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; color:rgba(0, 0, 0, 1.0);"><b>To: </b></span><span style="font-family:'Helvetica';"><a href="mailto:reviews+D5156+public+93dd31b537f620bf@reviews.llvm.org">reviews+D5156+public+93dd31b537f620bf@reviews.llvm.org</a><br></span></div><br><div>This is a good question. InstCombine is a local pattern matcher at the instruction level. I did not want adding a global flavor by introducing the dominator tree in that pass. Also I would have to mess around with the combiner logic when inserting an instruction like an “or” which is not the immediate replacement instruction of the select. I also looked at the SimplifyCFG and if-conversion code, but none seem a natural fit for this optimization. I’m not super happy about a new pass but it looked like the kleinstes Uebel among the choices.<br><br>Cheers<br>Gerolf<br><br>On Sep 2, 2014, at 12:59 PM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>> wrote:<br><br><blockquote type="cite">Why isn't this an instcombine on select instructions?<br><br><a href="http://reviews.llvm.org/D5156">http://reviews.llvm.org/D5156</a><br><br><br></blockquote><br></div></blockquote></div><br></body></html>