llvm-project
llvm-project copied to clipboard
[X86] Missed Fold: `vgf2p8affineqb(x, m, imm8) ^ C` => `vgf2p8affineqb(x, m, imm8 ^ C)`
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.
affineNot_clang:
gf2p8affineqb xmm0, xmm1, 0
pcmpeqd xmm1, xmm1
pxor xmm0, xmm1
ret
affineNot_tgt:
gf2p8affineqb xmm0, xmm1, 255
ret
https://godbolt.org/z/4qhG5fGq3
@llvm/issue-subscribers-backend-x86
Author: Walter (WalterKruger)
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.
affineNot_clang:
gf2p8affineqb xmm0, xmm1, 0
pcmpeqd xmm1, xmm1
pxor xmm0, xmm1
ret
affineNot_tgt:
gf2p8affineqb xmm0, xmm1, 255
ret
https://godbolt.org/z/4qhG5fGq3
@WalterKruger i would like to work on this issue .
This appears to be fixed by #179103, which has already been merged.