<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 25, 2012, at 7:38 PM, Hal Finkel wrote:</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; 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-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">This interests me because I also need some procedure for<br>reassociating in order to have basic-block vectorization do something<br>interesting for reductions. To start, I'd want a+b+c+d+e+f+g+h,<br>regardless of the original association, to be transformed into:<br>(a+b)+(c+d)+(e+f)+(g+h) or (a+b+c+d)+(e+f+g+h) [the number of groups<br>should depend on the target's vector length, and maybe some other<br>things as well].<br><br>I'm not sure whether I should try to bake this into Reassociate, or<br>refactor Reassociate so that parts of it can be used by BBVectorize, or<br>something else. Do you have an opinion?</span></blockquote></div><br><div>This sounds to me like something BBVectorize should do only after determining the expression is vectorizable.</div><div><br></div><div>-Andy</div></body></html>