| Issue |
178082
|
| Summary |
Missed AVX2 Vectorization
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Disservin
|
The following code could benefit from avx2 store, which clang doesn't perform. GCC only starts to do this once `__restrict__` is added.
https://godbolt.org/z/4TzWv3r4x
```c++
void set_check_info_cached(Bitboard* __restrict__ checkSquares, Square ksq) {
const Bitboard occupied = pieces();
const Bitboard bishopAtk = attacks_bb<BISHOP>(ksq, occupied);
const Bitboard rookAtk = attacks_bb<ROOK>(ksq, occupied);
checkSquares[PAWN] = PseudoAttacks[PAWN][ksq];
checkSquares[KNIGHT] = PseudoAttacks[KNIGHT][ksq];
checkSquares[BISHOP] = bishopAtk;
checkSquares[ROOK] = rookAtk;
checkSquares[QUEEN] = bishopAtk | rookAtk;
}
```
I also think `set_check_info_sequential` should be able to be transformed to look like `set_check_info_cached` ?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs