<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 16, 2016 at 11:48 AM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Rail,<div><br></div><div>Two hints to begin with:<div><br></div><div>1) Makes sure you example is vectorized on X86 for example<div>2) Is your target correctly overriding the TTI (declaring the vector register size for example) so that the vectorizer can kicks-in (see X86TTIImpl::getRegisterBitWidth for instance). Alternatively you can test the SLP vectorizer by passing to clang: -mllvm -slp-max-reg-size -mllvm 512 (I don't see an equivalent option for the loop vectorizer though).</div><div><br></div></div></div></div></blockquote><div>Well, it sort of worked. I added a getRegisterBitWidth(...) but then I got this error:</div><div><br></div><div><div>fatal error: error in backend: Cannot select: 0x5e949a8: v4i32 = BUILD_VECTOR 0x5e91ae8, 0x5e91ae8, 0x5e91ae8, 0x5e91ae8 [ORD=16] [ID=16]</div><div> 0x5e91ae8: i32 = Constant<0> [ID=5]</div><div> 0x5e91ae8: i32 = Constant<0> [ID=5]</div><div> 0x5e91ae8: i32 = Constant<0> [ID=5]</div><div> 0x5e91ae8: i32 = Constant<0> [ID=5]</div></div><div><br></div><div>What am I missing?</div><div><br></div><div>Any help is appreciated.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><div></div><div>-- </div><div>Mehdi</div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin<br></div>Software Engineer <br>Esencia Technologies<br></div></div></div></div>
</div></div>