WalterKruger
WalterKruger
It is a common idiom to check for unsigned underflow by doing a greater than compare between the difference and minuend: ```C #include uint64_t subIfNoUnderflow_clang(uint64_t a, uint64_t b) { uint64_t...
Vector multiplication by most 8-bit constants is currently implemented by a width extension to 16-bits: ```asm multiplyBy10_clang: movdqa xmm1, xmm0 punpckhbw xmm1, xmm1 movdqa xmm2, xmmword ptr [rip + .LCPI0_0]...
8-bit shifts by a variable amount are implemented by three selections between a shift by a power of two and the unshifted value based on the corresponding amount bits: ```asm...
Since shuffles only change the arrangement of elements within a vector, it should be legal to reassociate operations that transform all lanes in the same manner to occur before/after they...
Due to gaps in support on x86, some vector comparisons have to be implemented by inverting the opposite condition. clang avoids that when implementing a conditional increment by instead conditionally...
[X86] Missed Fold: `vgf2p8affineqb(x, m1) ^ vgf2p8affineqb(x, m2)` => `vgf2p8affineqb(x, m1 ^ m2)`
The matrix in `vgf2p8affineqb` can be interpreted as determining which bits of the input are XORed together for each position. Following from that, XORing two affines of the same input...
Performing a 8-bit shift on `vgf2p8affineqb` can be folded by together by shifting its matrix by 8 times the shift amount in the opposite direction. The position of each matrix...
The immediate in the `vgf2p8affineqb` instruction applies a XOR after the main affine transformation. This can be folded with standalone XORs by any splatted 8-bit constants. ```asm affineNot_clang: gf2p8affineqb xmm0,...
XORs by any splatted 8-bit constants that occur prior to a `vgf2p8affineqb` can be folded with its immediate. This requires permuting that constant in the same manner as the input...
Given that `vgf2p8affineqb` performs a XOR permutations of the input, and that XORs are associative, a composition of multiple `vgf2p8affineqb` operations can be folded into a one: ```asm revRunningParity_clang: gf2p8affineqb...