title: How can I load a literal value into mask (k) register?
body: <p>I want to load an AVX512 "k" register with a specific bit pattern.</p>
  
  <p>The best I could come up with is to zero a 32-bit register, add the constant, and then move that.  There must be a shorter sequence of instructions to do this, but I can't find it.  </p>
  
  <pre><code>   4:   31 c0                   xor    %eax,%eax                   
     6:   05 aa aa 00 00          add    $0xaaaa,%eax                
     b:   c5 f8 92 f8             kmovw  %eax,%k7
  </code></pre>