This one required quite a bit of an assembly surgery, but i think it's in the right ballpark..
The only sched models that for cpu's that support avx2
but not avx512 are: haswell, broadwell, skylake, zen1-3
For load we have:
https://godbolt.org/z/na97Kb96o - for intels Block RThroughput: <=64.0; for ryzens, Block RThroughput: <=32.0
So could pick cost of 64.
For store we have:
https://godbolt.org/z/GG1WeoKar - for intels Block RThroughput: =66.0; for ryzens, Block RThroughput: <=27.5
So we could pick cost of 66.
I'm directly using the shuffling asm the llc produced,
without any manual fixups that may be needed
to ensure sequential execution.
clang-format: please reformat the code