Are older SIMD-versions available when using newer ones?

前端 未结 3 1167
孤独总比滥情好
孤独总比滥情好 2021-02-13 15:47

When I can use SSE3 or AVX, are then older SSE versions as SSE2 or MMX available -
or do I still need to check for them separately?

3条回答
  •  故里飘歌
    2021-02-13 16:25

    As a general rule - don't mix different generations of SSE / AVX unless you have to. If you do, make sure you use vzeroupper or similar state clearing instructions, otherwise you may drag partial values and unknowingly create false dependencies, since most of the registers are shared between the modes Even when clearing, switching between modes may cause penalties, depending on the exact micro architecture.

    Further reading - https://software.intel.com/sites/default/files/m/d/4/1/d/8/11MC12_Avoiding_2BAVX-SSE_2BTransition_2BPenalties_2Brh_2Bfinal.pdf

提交回复
热议问题