Question on AVX Instruction set reference

Question on AVX Instruction set reference

If suppose there is a legacy 128 bit SIMD instrcution and the data is held in a 256 bit register. And if the entire 256 bit data is to be processed but since only a 128 bit SIMD is availabale, how can one:

1. run the instruction on the lower 128 bits
2. run the instruction on the upper 128 bits
3. shift the upper 128 bits to the lower 128 bit position

Thanks

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Instructions prior to AVX don't touch the upper 128 bits. AVX instructions are available to copy the upper 128 bits to the lower 128, where an SSE instruction can operate. Following the SSE instruction, VZEROUPPER is required to clear the upper 128 bits to avoid ugly hardware timing dependencies in subsequent AVX instructions. Switching in and out of AVX normally occurs during function call/return; interprocedural optimizations aren't supported in this context, to my knowledge.

Leave a Comment

Please sign in to add a comment. Not a member? Join today