<div dir="ltr"><div class="inbox-inbox-line inbox-inbox-number3 inbox-inbox-index2 inbox-inbox-alt2" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;background-image:initial;background-position:0px 50%;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:20px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;box-sizing:content-box;min-height:inherit">Hello, </div><div class="inbox-inbox-line inbox-inbox-number3 inbox-inbox-index2 inbox-inbox-alt2" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;background-image:initial;background-position:0px 50%;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:0px;float:none;height:auto;line-height:20px;outline:0px;overflow:visible;vertical-align:baseline;width:auto;box-sizing:content-box;min-height:inherit"><br></div>I'm playing around with vectorization in LLVM 6.0.0, and I noticed that when creating a vector load out of a scalar load, the  alignment for the vector load is defined to be the one of the scalar load. For instance, 16-bit vectors get aligned on 2 bytes. This does not correspond to the preferred alignment for vectors that I specified in the data layout (which is bigger). <div><br><div>Inspecting lib/Transforms/Vectorize/LoopVectorizer.cpp, there doesn't seem to be an intent of doing so. <div>I looked at this method in particular: </div><div><br>void InnerLoopVectorizer::vectorizeMemoryInstruction</div></div></div><div><br></div><div>Is there a way (that I missed) to make this happen, or would it require a code change ? Or did I miss anything obvious ?</div><div><br></div><div>Thanks in advance,</div><div>- Benoit</div></div>