On 6/13/2016 5:21 PM, Yuanhan Liu wrote: > On Sun, Jun 12, 2016 at 02:29:42PM +0000, Jianfeng Tan wrote: >> Compile DPDK with clang, below line in virtio_rxtx.c could be >> optimized with four "VMOVAPS ymm, m256". >> memset(&rxvq->fake_mbuf, 0, sizeof(rxvq->fake_mbuf)); >> >> This instruction requires memory address is 32-byte aligned. >> Or, it leads to segfault. > That looks like a dangerous optimization to me.If that's the case, > doesn't it mean we have to make sure the address is always aligned > properly while calling memset?
I guess clang does such optimization when length is a 32-byte aligned immediate number. May need more information here. Thanks, Jianfeng > > --yliu