<div dir="ltr"><div><br></div><div>I used CreateVectorSplat to create a vector for a double variable x, e.g., <x, x>. I expected that it would work like _mm_set1_pd for sse or _mm256_broadcast_sd for avx. But it turned out that llc -O3 would create the following assembly. I don't understand why it needs to move it to two xmm registers and then unpack it. Is it because of alignment? </div><br><div><div>    movq    %rcx, %rbx</div><div>    vmovd   %esi, %xmm4</div><div>    vpbroadcastq    %xmm4, %xmm5</div><div>    vmovdqa %xmm5, 64(%rsp)         # 16-byte Spill</div><div>    vpextrq $1, %xmm5, %rax</div><div>    cltq</div><div>    vmovq   %rax, %xmm4</div><div>    vmovq   %xmm5, %rcx</div><div>    movslq  %ecx, %rcx</div><div>    vmovq   %rcx, %xmm5</div><div>    vpunpcklqdq %xmm4, %xmm5, %xmm4 # xmm4 = xmm5[0],xmm4[0]</div></div><div><br></div><div>Thanks,</div><div>Best</div></div>