View Single Post
Old 2022-09-15, 02:10   #1
Mysticial
 
Mysticial's Avatar
 
Sep 2016

2·5·37 Posts
Default Emulating AVX512 vpcompressd

I can't say why anyone would want to do this, but I'm looking for a 2nd set of eyes.

Can this instruction:
Code:
    vpcompressd [mem]{k}, zmm
be emulated as follows:
Code:
    vpcompressd zmm0{k1}{z}, zmm0
    kmovd       eax, k1
    pext        eax, -1, eax     (the -1 in a register of course)
    kmovd       k1, eax
    vmovdqu32   [mem]{k1}, zmm0
I haven't tested this sequence yet, but I feel like this is too simple to be correct.

Last fiddled with by Mysticial on 2022-09-15 at 02:11
Mysticial is offline   Reply With Quote