AVX Bitwise ternary logic instruction busted

This post is aimed at enthusiasts of SIMD CPU programming and veteran Amiga programmers struggling with calculating “minterm” blitter values. The author was inspired by a talk on AVX-512 ISA design and an obscure AVX instruction called vpternlogd. This instruction allows complex bitwise logic operations on 512 bits at once with three inputs. Instead of overwhelming users with more specific instructions, Intel opted for a flexible solution. Interestingly, the method for calculating minterm values on Amiga blitters from 1985 can be applied to modern AVX instructions. The post highlights a clever way to simplify the process and even points out a funny coincidence in the Intel documentation.

https://arnaud-carre.github.io/2024-10-06-vpternlogd/

To top