<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;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 22, 2014, at 10:23 AM, Andrew Trick <<a href="mailto:atrick@apple.com" class="">atrick@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div 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;" class="">Arnold is right that something that uses SCEVExpander is obfuscating the IR. It would be nice to know what. Is it the partial unroller? (I really don’t like that pass running independently from the loop vectorizer).</div><div 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;" class=""><br class=""></div><div 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;" class="">There is another completely different way to approach this. The SLP vectorizer wants to know if instructions can statically alias within the same block. AliasAnalysis is way to conservative to handle this query. In other words, we should have a kind of alias analysis that can treat phis (especially in the loop header) as base pointers.</div></div></blockquote></div><br class=""><div class="">Sorry, that statement about alias analysis was totally wrong and misleading. I looked at this again with Arnold and agree that BasicAA should really be able to handle this loop. One of the passes, maybe indvars, maybe loop unroll, is generating nasty induction variables. We need to see the test case or IR before transformation to understand what happened.</div><div class=""><br class=""></div><div class="">SVEV-AA is potentially a valuable tool, but very expensive in passes like SLP where we’re not already generating SCEV expressions within the loop, except in very limited cases.</div><div class=""><br class=""></div><div class="">This particular loop is simple enough that it should not merit adding such an expensive analysis.</div><div class=""><br class=""></div><div class="">-Andy</div></body></html>