Skip to content

[X86] Missed Fold: vgf2p8affineqb(x, m, imm8) ^ C => vgf2p8affineqb(x, m, imm8 ^ C) #178795

@WalterKruger

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions