<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><blockquote type="cite"><div>On Jul 25, 2014, at 8:48 AM, Tobias Grosser <<a href="mailto:tobias@grosser.es">tobias@grosser.es</a>> wrote:</div><br class="Apple-interchange-newline"><div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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; float: none; display: inline !important;">On 25/07/2014 17:41, James Molloy wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;">Hi Nadav, Arnold,<br><br><br><br>I've come across an interesting optimization problem in one of the SPEC<br>benchmarks. There is a loop that can be optimized by both the SLP vectorizer<br>and the loop vectorizer (when I patch the loop vectorizer to deal with fsub<br>reductions).<br><br><br><br>The SLP vectorizer actually makes the performance worse - I think this is<br>due to a lack of loop unrolling afterwards. The Loop vectorizer can improve<br>the performance.<br><br><br><br>However, the loop vectorizer runs after the SLP vectorizer, so it never gets<br>a chance. I'd have thought the ideal order would be Loop Vectorizer -> SLP<br>vectorizer -> BB vectorizer, given that the loop vectorizer if it can run<br>will probably give greater speedup than SLP.<br><br><br><br>The current sequence is SLP vectorizer -> BB vectorizer -> Loop vectorizer.<br></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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; float: none; display: inline !important;">Even though I was not directly addressed. I still reply.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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 style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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; float: none; display: inline !important;">The proposed new order is what I think makes most sense. I wonder what was the reason to go for the current order. Nadav, Arnold did you choose this order?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 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;"></div></blockquote></div><div><br></div>See my answer to James. We loose noalias information during inlining (until recently - thanks Hal for moving forward with the scoped noalias feature!).<div><br></div><div>We should absolutely evaluate moving the SLPVectorizer out of the inliner PM once we have working scoped noalias information.</div><div><br></div><div>Inlining could obscure patterns of parallelism the SLPVectorizer can recognize so their might be some losses - Erik’s work on making the SLPVectorizer more robust with respect to recognizing what schedules prevent vectorization plus work on recognizing more (possible mid-tree) patterns  should enable us to deal with some of the fallout I think.</div></body></html>