| Issue |
179606
|
| Summary |
[X86] Missed Fold: `vgf2p8affineqb(x ^ C, M, imm8)` => `vgf2p8affineqb(x, M, (u8)vgf2p8affineqb(C, M, imm8))`
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
WalterKruger
|
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 (including the XOR by the current immediate), and setting that as the new immediate.
Only works if the 64-bit matrix is the same for all lanes as they all use the same immediate.
```asm
invLSBReverse_clang:
pxor xmm0, xmmword ptr [rip + .LCPI0_0]
gf2p8affineqb xmm0, xmmword ptr [rip + .LCPI0_1], 0
ret
```
```asm
invLSBReverse_tgt:
gf2p8affineqb xmm0, xmmword ptr [rip + .LCPI1_0], 128
ret
```
https://godbolt.org/z/ax7e7rq5o
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs